mavlink/home/runner/work/rust-mavlink/rust-mavlink/target/debug/build/mavlink-82e5138eb12fa796/out/
uavionix.rs

1#![doc = "MAVLink uAvionix dialect."]
2#![doc = ""]
3#![doc = "This file was automatically generated, do not edit."]
4#![allow(deprecated)]
5#[cfg(feature = "arbitrary")]
6use arbitrary::Arbitrary;
7#[allow(unused_imports)]
8use bitflags::bitflags;
9use mavlink_core::{bytes::Bytes, bytes_mut::BytesMut, MavlinkVersion, Message, MessageData};
10#[allow(unused_imports)]
11use num_derive::FromPrimitive;
12#[allow(unused_imports)]
13use num_derive::ToPrimitive;
14#[allow(unused_imports)]
15use num_traits::FromPrimitive;
16#[allow(unused_imports)]
17use num_traits::ToPrimitive;
18#[cfg(feature = "serde")]
19use serde::{Deserialize, Serialize};
20pub const MINOR_MAVLINK_VERSION: u8 = 3u8;
21#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
22#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23#[cfg_attr(feature = "serde", serde(tag = "type"))]
24#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25#[repr(u32)]
26#[doc = "Actuator configuration, used to change a setting on an actuator. Component information metadata can be used to know which outputs support which commands."]
27pub enum ActuatorConfiguration {
28    #[doc = "Do nothing."]
29    ACTUATOR_CONFIGURATION_NONE = 0,
30    #[doc = "Command the actuator to beep now."]
31    ACTUATOR_CONFIGURATION_BEEP = 1,
32    #[doc = "Permanently set the actuator (ESC) to 3D mode (reversible thrust)."]
33    ACTUATOR_CONFIGURATION_3D_MODE_ON = 2,
34    #[doc = "Permanently set the actuator (ESC) to non 3D mode (non-reversible thrust)."]
35    ACTUATOR_CONFIGURATION_3D_MODE_OFF = 3,
36    #[doc = "Permanently set the actuator (ESC) to spin direction 1 (which can be clockwise or counter-clockwise)."]
37    ACTUATOR_CONFIGURATION_SPIN_DIRECTION1 = 4,
38    #[doc = "Permanently set the actuator (ESC) to spin direction 2 (opposite of direction 1)."]
39    ACTUATOR_CONFIGURATION_SPIN_DIRECTION2 = 5,
40}
41impl ActuatorConfiguration {
42    pub const DEFAULT: Self = Self::ACTUATOR_CONFIGURATION_NONE;
43}
44impl Default for ActuatorConfiguration {
45    fn default() -> Self {
46        Self::DEFAULT
47    }
48}
49#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
50#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
51#[cfg_attr(feature = "serde", serde(tag = "type"))]
52#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
53#[repr(u32)]
54#[doc = "Actuator output function. Values greater or equal to 1000 are autopilot-specific."]
55pub enum ActuatorOutputFunction {
56    #[doc = "No function (disabled)."]
57    ACTUATOR_OUTPUT_FUNCTION_NONE = 0,
58    #[doc = "Motor 1"]
59    ACTUATOR_OUTPUT_FUNCTION_MOTOR1 = 1,
60    #[doc = "Motor 2"]
61    ACTUATOR_OUTPUT_FUNCTION_MOTOR2 = 2,
62    #[doc = "Motor 3"]
63    ACTUATOR_OUTPUT_FUNCTION_MOTOR3 = 3,
64    #[doc = "Motor 4"]
65    ACTUATOR_OUTPUT_FUNCTION_MOTOR4 = 4,
66    #[doc = "Motor 5"]
67    ACTUATOR_OUTPUT_FUNCTION_MOTOR5 = 5,
68    #[doc = "Motor 6"]
69    ACTUATOR_OUTPUT_FUNCTION_MOTOR6 = 6,
70    #[doc = "Motor 7"]
71    ACTUATOR_OUTPUT_FUNCTION_MOTOR7 = 7,
72    #[doc = "Motor 8"]
73    ACTUATOR_OUTPUT_FUNCTION_MOTOR8 = 8,
74    #[doc = "Motor 9"]
75    ACTUATOR_OUTPUT_FUNCTION_MOTOR9 = 9,
76    #[doc = "Motor 10"]
77    ACTUATOR_OUTPUT_FUNCTION_MOTOR10 = 10,
78    #[doc = "Motor 11"]
79    ACTUATOR_OUTPUT_FUNCTION_MOTOR11 = 11,
80    #[doc = "Motor 12"]
81    ACTUATOR_OUTPUT_FUNCTION_MOTOR12 = 12,
82    #[doc = "Motor 13"]
83    ACTUATOR_OUTPUT_FUNCTION_MOTOR13 = 13,
84    #[doc = "Motor 14"]
85    ACTUATOR_OUTPUT_FUNCTION_MOTOR14 = 14,
86    #[doc = "Motor 15"]
87    ACTUATOR_OUTPUT_FUNCTION_MOTOR15 = 15,
88    #[doc = "Motor 16"]
89    ACTUATOR_OUTPUT_FUNCTION_MOTOR16 = 16,
90    #[doc = "Servo 1"]
91    ACTUATOR_OUTPUT_FUNCTION_SERVO1 = 33,
92    #[doc = "Servo 2"]
93    ACTUATOR_OUTPUT_FUNCTION_SERVO2 = 34,
94    #[doc = "Servo 3"]
95    ACTUATOR_OUTPUT_FUNCTION_SERVO3 = 35,
96    #[doc = "Servo 4"]
97    ACTUATOR_OUTPUT_FUNCTION_SERVO4 = 36,
98    #[doc = "Servo 5"]
99    ACTUATOR_OUTPUT_FUNCTION_SERVO5 = 37,
100    #[doc = "Servo 6"]
101    ACTUATOR_OUTPUT_FUNCTION_SERVO6 = 38,
102    #[doc = "Servo 7"]
103    ACTUATOR_OUTPUT_FUNCTION_SERVO7 = 39,
104    #[doc = "Servo 8"]
105    ACTUATOR_OUTPUT_FUNCTION_SERVO8 = 40,
106    #[doc = "Servo 9"]
107    ACTUATOR_OUTPUT_FUNCTION_SERVO9 = 41,
108    #[doc = "Servo 10"]
109    ACTUATOR_OUTPUT_FUNCTION_SERVO10 = 42,
110    #[doc = "Servo 11"]
111    ACTUATOR_OUTPUT_FUNCTION_SERVO11 = 43,
112    #[doc = "Servo 12"]
113    ACTUATOR_OUTPUT_FUNCTION_SERVO12 = 44,
114    #[doc = "Servo 13"]
115    ACTUATOR_OUTPUT_FUNCTION_SERVO13 = 45,
116    #[doc = "Servo 14"]
117    ACTUATOR_OUTPUT_FUNCTION_SERVO14 = 46,
118    #[doc = "Servo 15"]
119    ACTUATOR_OUTPUT_FUNCTION_SERVO15 = 47,
120    #[doc = "Servo 16"]
121    ACTUATOR_OUTPUT_FUNCTION_SERVO16 = 48,
122}
123impl ActuatorOutputFunction {
124    pub const DEFAULT: Self = Self::ACTUATOR_OUTPUT_FUNCTION_NONE;
125}
126impl Default for ActuatorOutputFunction {
127    fn default() -> Self {
128        Self::DEFAULT
129    }
130}
131#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
132#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
133#[cfg_attr(feature = "serde", serde(tag = "type"))]
134#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
135#[repr(u32)]
136#[doc = "Enumeration of the ADSB altimeter types"]
137pub enum AdsbAltitudeType {
138    #[doc = "Altitude reported from a Baro source using QNH reference"]
139    ADSB_ALTITUDE_TYPE_PRESSURE_QNH = 0,
140    #[doc = "Altitude reported from a GNSS source"]
141    ADSB_ALTITUDE_TYPE_GEOMETRIC = 1,
142}
143impl AdsbAltitudeType {
144    pub const DEFAULT: Self = Self::ADSB_ALTITUDE_TYPE_PRESSURE_QNH;
145}
146impl Default for AdsbAltitudeType {
147    fn default() -> Self {
148        Self::DEFAULT
149    }
150}
151#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
152#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
153#[cfg_attr(feature = "serde", serde(tag = "type"))]
154#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
155#[repr(u32)]
156#[doc = "ADSB classification for the type of vehicle emitting the transponder signal"]
157pub enum AdsbEmitterType {
158    ADSB_EMITTER_TYPE_NO_INFO = 0,
159    ADSB_EMITTER_TYPE_LIGHT = 1,
160    ADSB_EMITTER_TYPE_SMALL = 2,
161    ADSB_EMITTER_TYPE_LARGE = 3,
162    ADSB_EMITTER_TYPE_HIGH_VORTEX_LARGE = 4,
163    ADSB_EMITTER_TYPE_HEAVY = 5,
164    ADSB_EMITTER_TYPE_HIGHLY_MANUV = 6,
165    ADSB_EMITTER_TYPE_ROTOCRAFT = 7,
166    ADSB_EMITTER_TYPE_UNASSIGNED = 8,
167    ADSB_EMITTER_TYPE_GLIDER = 9,
168    ADSB_EMITTER_TYPE_LIGHTER_AIR = 10,
169    ADSB_EMITTER_TYPE_PARACHUTE = 11,
170    ADSB_EMITTER_TYPE_ULTRA_LIGHT = 12,
171    ADSB_EMITTER_TYPE_UNASSIGNED2 = 13,
172    ADSB_EMITTER_TYPE_UAV = 14,
173    ADSB_EMITTER_TYPE_SPACE = 15,
174    ADSB_EMITTER_TYPE_UNASSGINED3 = 16,
175    ADSB_EMITTER_TYPE_EMERGENCY_SURFACE = 17,
176    ADSB_EMITTER_TYPE_SERVICE_SURFACE = 18,
177    ADSB_EMITTER_TYPE_POINT_OBSTACLE = 19,
178}
179impl AdsbEmitterType {
180    pub const DEFAULT: Self = Self::ADSB_EMITTER_TYPE_NO_INFO;
181}
182impl Default for AdsbEmitterType {
183    fn default() -> Self {
184        Self::DEFAULT
185    }
186}
187bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags indicate status such as data validity of each data source. Set = data valid"] pub struct AdsbFlags : u16 { const ADSB_FLAGS_VALID_COORDS = 1 ; const ADSB_FLAGS_VALID_ALTITUDE = 2 ; const ADSB_FLAGS_VALID_HEADING = 4 ; const ADSB_FLAGS_VALID_VELOCITY = 8 ; const ADSB_FLAGS_VALID_CALLSIGN = 16 ; const ADSB_FLAGS_VALID_SQUAWK = 32 ; const ADSB_FLAGS_SIMULATED = 64 ; const ADSB_FLAGS_VERTICAL_VELOCITY_VALID = 128 ; const ADSB_FLAGS_BARO_VALID = 256 ; const ADSB_FLAGS_SOURCE_UAT = 32768 ; } }
188impl AdsbFlags {
189    pub const DEFAULT: Self = Self::ADSB_FLAGS_VALID_COORDS;
190}
191impl Default for AdsbFlags {
192    fn default() -> Self {
193        Self::DEFAULT
194    }
195}
196bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags are used in the AIS_VESSEL.fields bitmask to indicate validity of data in the other message fields. When set, the data is valid."] pub struct AisFlags : u16 { # [doc = "1 = Position accuracy less than 10m, 0 = position accuracy greater than 10m."] const AIS_FLAGS_POSITION_ACCURACY = 1 ; const AIS_FLAGS_VALID_COG = 2 ; const AIS_FLAGS_VALID_VELOCITY = 4 ; # [doc = "1 = Velocity over 52.5765m/s (102.2 knots)"] const AIS_FLAGS_HIGH_VELOCITY = 8 ; const AIS_FLAGS_VALID_TURN_RATE = 16 ; # [doc = "Only the sign of the returned turn rate value is valid, either greater than 5deg/30s or less than -5deg/30s"] const AIS_FLAGS_TURN_RATE_SIGN_ONLY = 32 ; const AIS_FLAGS_VALID_DIMENSIONS = 64 ; # [doc = "Distance to bow is larger than 511m"] const AIS_FLAGS_LARGE_BOW_DIMENSION = 128 ; # [doc = "Distance to stern is larger than 511m"] const AIS_FLAGS_LARGE_STERN_DIMENSION = 256 ; # [doc = "Distance to port side is larger than 63m"] const AIS_FLAGS_LARGE_PORT_DIMENSION = 512 ; # [doc = "Distance to starboard side is larger than 63m"] const AIS_FLAGS_LARGE_STARBOARD_DIMENSION = 1024 ; const AIS_FLAGS_VALID_CALLSIGN = 2048 ; const AIS_FLAGS_VALID_NAME = 4096 ; } }
197impl AisFlags {
198    pub const DEFAULT: Self = Self::AIS_FLAGS_POSITION_ACCURACY;
199}
200impl Default for AisFlags {
201    fn default() -> Self {
202        Self::DEFAULT
203    }
204}
205#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
206#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
207#[cfg_attr(feature = "serde", serde(tag = "type"))]
208#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
209#[repr(u32)]
210#[doc = "Navigational status of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
211pub enum AisNavStatus {
212    #[doc = "Under way using engine."]
213    UNDER_WAY = 0,
214    AIS_NAV_ANCHORED = 1,
215    AIS_NAV_UN_COMMANDED = 2,
216    AIS_NAV_RESTRICTED_MANOEUVERABILITY = 3,
217    AIS_NAV_DRAUGHT_CONSTRAINED = 4,
218    AIS_NAV_MOORED = 5,
219    AIS_NAV_AGROUND = 6,
220    AIS_NAV_FISHING = 7,
221    AIS_NAV_SAILING = 8,
222    AIS_NAV_RESERVED_HSC = 9,
223    AIS_NAV_RESERVED_WIG = 10,
224    AIS_NAV_RESERVED_1 = 11,
225    AIS_NAV_RESERVED_2 = 12,
226    AIS_NAV_RESERVED_3 = 13,
227    #[doc = "Search And Rescue Transponder."]
228    AIS_NAV_AIS_SART = 14,
229    #[doc = "Not available (default)."]
230    AIS_NAV_UNKNOWN = 15,
231}
232impl AisNavStatus {
233    pub const DEFAULT: Self = Self::UNDER_WAY;
234}
235impl Default for AisNavStatus {
236    fn default() -> Self {
237        Self::DEFAULT
238    }
239}
240#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
241#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
242#[cfg_attr(feature = "serde", serde(tag = "type"))]
243#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
244#[repr(u32)]
245#[doc = "Type of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
246pub enum AisType {
247    #[doc = "Not available (default)."]
248    AIS_TYPE_UNKNOWN = 0,
249    AIS_TYPE_RESERVED_1 = 1,
250    AIS_TYPE_RESERVED_2 = 2,
251    AIS_TYPE_RESERVED_3 = 3,
252    AIS_TYPE_RESERVED_4 = 4,
253    AIS_TYPE_RESERVED_5 = 5,
254    AIS_TYPE_RESERVED_6 = 6,
255    AIS_TYPE_RESERVED_7 = 7,
256    AIS_TYPE_RESERVED_8 = 8,
257    AIS_TYPE_RESERVED_9 = 9,
258    AIS_TYPE_RESERVED_10 = 10,
259    AIS_TYPE_RESERVED_11 = 11,
260    AIS_TYPE_RESERVED_12 = 12,
261    AIS_TYPE_RESERVED_13 = 13,
262    AIS_TYPE_RESERVED_14 = 14,
263    AIS_TYPE_RESERVED_15 = 15,
264    AIS_TYPE_RESERVED_16 = 16,
265    AIS_TYPE_RESERVED_17 = 17,
266    AIS_TYPE_RESERVED_18 = 18,
267    AIS_TYPE_RESERVED_19 = 19,
268    #[doc = "Wing In Ground effect."]
269    AIS_TYPE_WIG = 20,
270    AIS_TYPE_WIG_HAZARDOUS_A = 21,
271    AIS_TYPE_WIG_HAZARDOUS_B = 22,
272    AIS_TYPE_WIG_HAZARDOUS_C = 23,
273    AIS_TYPE_WIG_HAZARDOUS_D = 24,
274    AIS_TYPE_WIG_RESERVED_1 = 25,
275    AIS_TYPE_WIG_RESERVED_2 = 26,
276    AIS_TYPE_WIG_RESERVED_3 = 27,
277    AIS_TYPE_WIG_RESERVED_4 = 28,
278    AIS_TYPE_WIG_RESERVED_5 = 29,
279    AIS_TYPE_FISHING = 30,
280    AIS_TYPE_TOWING = 31,
281    #[doc = "Towing: length exceeds 200m or breadth exceeds 25m."]
282    AIS_TYPE_TOWING_LARGE = 32,
283    #[doc = "Dredging or other underwater ops."]
284    AIS_TYPE_DREDGING = 33,
285    AIS_TYPE_DIVING = 34,
286    AIS_TYPE_MILITARY = 35,
287    AIS_TYPE_SAILING = 36,
288    AIS_TYPE_PLEASURE = 37,
289    AIS_TYPE_RESERVED_20 = 38,
290    AIS_TYPE_RESERVED_21 = 39,
291    #[doc = "High Speed Craft."]
292    AIS_TYPE_HSC = 40,
293    AIS_TYPE_HSC_HAZARDOUS_A = 41,
294    AIS_TYPE_HSC_HAZARDOUS_B = 42,
295    AIS_TYPE_HSC_HAZARDOUS_C = 43,
296    AIS_TYPE_HSC_HAZARDOUS_D = 44,
297    AIS_TYPE_HSC_RESERVED_1 = 45,
298    AIS_TYPE_HSC_RESERVED_2 = 46,
299    AIS_TYPE_HSC_RESERVED_3 = 47,
300    AIS_TYPE_HSC_RESERVED_4 = 48,
301    AIS_TYPE_HSC_UNKNOWN = 49,
302    AIS_TYPE_PILOT = 50,
303    #[doc = "Search And Rescue vessel."]
304    AIS_TYPE_SAR = 51,
305    AIS_TYPE_TUG = 52,
306    AIS_TYPE_PORT_TENDER = 53,
307    #[doc = "Anti-pollution equipment."]
308    AIS_TYPE_ANTI_POLLUTION = 54,
309    AIS_TYPE_LAW_ENFORCEMENT = 55,
310    AIS_TYPE_SPARE_LOCAL_1 = 56,
311    AIS_TYPE_SPARE_LOCAL_2 = 57,
312    AIS_TYPE_MEDICAL_TRANSPORT = 58,
313    #[doc = "Noncombatant ship according to RR Resolution No. 18."]
314    AIS_TYPE_NONECOMBATANT = 59,
315    AIS_TYPE_PASSENGER = 60,
316    AIS_TYPE_PASSENGER_HAZARDOUS_A = 61,
317    AIS_TYPE_PASSENGER_HAZARDOUS_B = 62,
318    AIS_TYPE_PASSENGER_HAZARDOUS_C = 63,
319    AIS_TYPE_PASSENGER_HAZARDOUS_D = 64,
320    AIS_TYPE_PASSENGER_RESERVED_1 = 65,
321    AIS_TYPE_PASSENGER_RESERVED_2 = 66,
322    AIS_TYPE_PASSENGER_RESERVED_3 = 67,
323    AIS_TYPE_PASSENGER_RESERVED_4 = 68,
324    AIS_TYPE_PASSENGER_UNKNOWN = 69,
325    AIS_TYPE_CARGO = 70,
326    AIS_TYPE_CARGO_HAZARDOUS_A = 71,
327    AIS_TYPE_CARGO_HAZARDOUS_B = 72,
328    AIS_TYPE_CARGO_HAZARDOUS_C = 73,
329    AIS_TYPE_CARGO_HAZARDOUS_D = 74,
330    AIS_TYPE_CARGO_RESERVED_1 = 75,
331    AIS_TYPE_CARGO_RESERVED_2 = 76,
332    AIS_TYPE_CARGO_RESERVED_3 = 77,
333    AIS_TYPE_CARGO_RESERVED_4 = 78,
334    AIS_TYPE_CARGO_UNKNOWN = 79,
335    AIS_TYPE_TANKER = 80,
336    AIS_TYPE_TANKER_HAZARDOUS_A = 81,
337    AIS_TYPE_TANKER_HAZARDOUS_B = 82,
338    AIS_TYPE_TANKER_HAZARDOUS_C = 83,
339    AIS_TYPE_TANKER_HAZARDOUS_D = 84,
340    AIS_TYPE_TANKER_RESERVED_1 = 85,
341    AIS_TYPE_TANKER_RESERVED_2 = 86,
342    AIS_TYPE_TANKER_RESERVED_3 = 87,
343    AIS_TYPE_TANKER_RESERVED_4 = 88,
344    AIS_TYPE_TANKER_UNKNOWN = 89,
345    AIS_TYPE_OTHER = 90,
346    AIS_TYPE_OTHER_HAZARDOUS_A = 91,
347    AIS_TYPE_OTHER_HAZARDOUS_B = 92,
348    AIS_TYPE_OTHER_HAZARDOUS_C = 93,
349    AIS_TYPE_OTHER_HAZARDOUS_D = 94,
350    AIS_TYPE_OTHER_RESERVED_1 = 95,
351    AIS_TYPE_OTHER_RESERVED_2 = 96,
352    AIS_TYPE_OTHER_RESERVED_3 = 97,
353    AIS_TYPE_OTHER_RESERVED_4 = 98,
354    AIS_TYPE_OTHER_UNKNOWN = 99,
355}
356impl AisType {
357    pub const DEFAULT: Self = Self::AIS_TYPE_UNKNOWN;
358}
359impl Default for AisType {
360    fn default() -> Self {
361        Self::DEFAULT
362    }
363}
364bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b00000000 indicates that none of the setpoint dimensions should be ignored."] pub struct AttitudeTargetTypemask : u8 { # [doc = "Ignore body roll rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE = 1 ; # [doc = "Ignore body pitch rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_PITCH_RATE_IGNORE = 2 ; # [doc = "Ignore body yaw rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_YAW_RATE_IGNORE = 4 ; # [doc = "Use 3D body thrust setpoint instead of throttle"] const ATTITUDE_TARGET_TYPEMASK_THRUST_BODY_SET = 32 ; # [doc = "Ignore throttle"] const ATTITUDE_TARGET_TYPEMASK_THROTTLE_IGNORE = 64 ; # [doc = "Ignore attitude"] const ATTITUDE_TARGET_TYPEMASK_ATTITUDE_IGNORE = 128 ; } }
365impl AttitudeTargetTypemask {
366    pub const DEFAULT: Self = Self::ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE;
367}
368impl Default for AttitudeTargetTypemask {
369    fn default() -> Self {
370        Self::DEFAULT
371    }
372}
373#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
374#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
375#[cfg_attr(feature = "serde", serde(tag = "type"))]
376#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
377#[repr(u32)]
378#[doc = "Axes that will be autotuned by MAV_CMD_DO_AUTOTUNE_ENABLE.         Note that at least one flag must be set in MAV_CMD_DO_AUTOTUNE_ENABLE.param2: if none are set, the flight stack will tune its default set of axes."]
379pub enum AutotuneAxis {
380    #[doc = "Autotune roll axis."]
381    AUTOTUNE_AXIS_ROLL = 1,
382    #[doc = "Autotune pitch axis."]
383    AUTOTUNE_AXIS_PITCH = 2,
384    #[doc = "Autotune yaw axis."]
385    AUTOTUNE_AXIS_YAW = 4,
386}
387impl AutotuneAxis {
388    pub const DEFAULT: Self = Self::AUTOTUNE_AXIS_ROLL;
389}
390impl Default for AutotuneAxis {
391    fn default() -> Self {
392        Self::DEFAULT
393    }
394}
395bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera capability flags (Bitmap)"] pub struct CameraCapFlags : u32 { # [doc = "Camera is able to record video"] const CAMERA_CAP_FLAGS_CAPTURE_VIDEO = 1 ; # [doc = "Camera is able to capture images"] const CAMERA_CAP_FLAGS_CAPTURE_IMAGE = 2 ; # [doc = "Camera has separate Video and Image/Photo modes (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_MODES = 4 ; # [doc = "Camera can capture images while in video mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_IMAGE_IN_VIDEO_MODE = 8 ; # [doc = "Camera can capture videos while in Photo/Image mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_VIDEO_IN_IMAGE_MODE = 16 ; # [doc = "Camera has image survey mode (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_IMAGE_SURVEY_MODE = 32 ; # [doc = "Camera has basic zoom control (MAV_CMD_SET_CAMERA_ZOOM)"] const CAMERA_CAP_FLAGS_HAS_BASIC_ZOOM = 64 ; # [doc = "Camera has basic focus control (MAV_CMD_SET_CAMERA_FOCUS)"] const CAMERA_CAP_FLAGS_HAS_BASIC_FOCUS = 128 ; # [doc = "Camera has video streaming capabilities (request VIDEO_STREAM_INFORMATION with MAV_CMD_REQUEST_MESSAGE for video streaming info)"] const CAMERA_CAP_FLAGS_HAS_VIDEO_STREAM = 256 ; # [doc = "Camera supports tracking of a point on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_POINT = 512 ; # [doc = "Camera supports tracking of a selection rectangle on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE = 1024 ; # [doc = "Camera supports tracking geo status (CAMERA_TRACKING_GEO_STATUS)."] const CAMERA_CAP_FLAGS_HAS_TRACKING_GEO_STATUS = 2048 ; # [doc = "Camera supports absolute thermal range (request CAMERA_THERMAL_RANGE with MAV_CMD_REQUEST_MESSAGE)."] const CAMERA_CAP_FLAGS_HAS_THERMAL_RANGE = 4096 ; } }
396impl CameraCapFlags {
397    pub const DEFAULT: Self = Self::CAMERA_CAP_FLAGS_CAPTURE_VIDEO;
398}
399impl Default for CameraCapFlags {
400    fn default() -> Self {
401        Self::DEFAULT
402    }
403}
404#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
405#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
406#[cfg_attr(feature = "serde", serde(tag = "type"))]
407#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
408#[repr(u32)]
409#[doc = "Camera Modes."]
410pub enum CameraMode {
411    #[doc = "Camera is in image/photo capture mode."]
412    CAMERA_MODE_IMAGE = 0,
413    #[doc = "Camera is in video capture mode."]
414    CAMERA_MODE_VIDEO = 1,
415    #[doc = "Camera is in image survey capture mode. It allows for camera controller to do specific settings for surveys."]
416    CAMERA_MODE_IMAGE_SURVEY = 2,
417}
418impl CameraMode {
419    pub const DEFAULT: Self = Self::CAMERA_MODE_IMAGE;
420}
421impl Default for CameraMode {
422    fn default() -> Self {
423        Self::DEFAULT
424    }
425}
426#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
427#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
428#[cfg_attr(feature = "serde", serde(tag = "type"))]
429#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
430#[repr(u32)]
431#[doc = "Camera sources for MAV_CMD_SET_CAMERA_SOURCE"]
432pub enum CameraSource {
433    #[doc = "Default camera source."]
434    CAMERA_SOURCE_DEFAULT = 0,
435    #[doc = "RGB camera source."]
436    CAMERA_SOURCE_RGB = 1,
437    #[doc = "IR camera source."]
438    CAMERA_SOURCE_IR = 2,
439    #[doc = "NDVI camera source."]
440    CAMERA_SOURCE_NDVI = 3,
441}
442impl CameraSource {
443    pub const DEFAULT: Self = Self::CAMERA_SOURCE_DEFAULT;
444}
445impl Default for CameraSource {
446    fn default() -> Self {
447        Self::DEFAULT
448    }
449}
450#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
451#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
452#[cfg_attr(feature = "serde", serde(tag = "type"))]
453#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
454#[repr(u32)]
455#[doc = "Camera tracking modes"]
456pub enum CameraTrackingMode {
457    #[doc = "Not tracking"]
458    CAMERA_TRACKING_MODE_NONE = 0,
459    #[doc = "Target is a point"]
460    CAMERA_TRACKING_MODE_POINT = 1,
461    #[doc = "Target is a rectangle"]
462    CAMERA_TRACKING_MODE_RECTANGLE = 2,
463}
464impl CameraTrackingMode {
465    pub const DEFAULT: Self = Self::CAMERA_TRACKING_MODE_NONE;
466}
467impl Default for CameraTrackingMode {
468    fn default() -> Self {
469        Self::DEFAULT
470    }
471}
472#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
473#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
474#[cfg_attr(feature = "serde", serde(tag = "type"))]
475#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
476#[repr(u32)]
477#[doc = "Camera tracking status flags"]
478pub enum CameraTrackingStatusFlags {
479    #[doc = "Camera is not tracking"]
480    CAMERA_TRACKING_STATUS_FLAGS_IDLE = 0,
481    #[doc = "Camera is tracking"]
482    CAMERA_TRACKING_STATUS_FLAGS_ACTIVE = 1,
483    #[doc = "Camera tracking in error state"]
484    CAMERA_TRACKING_STATUS_FLAGS_ERROR = 2,
485}
486impl CameraTrackingStatusFlags {
487    pub const DEFAULT: Self = Self::CAMERA_TRACKING_STATUS_FLAGS_IDLE;
488}
489impl Default for CameraTrackingStatusFlags {
490    fn default() -> Self {
491        Self::DEFAULT
492    }
493}
494bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera tracking target data (shows where tracked target is within image)"] pub struct CameraTrackingTargetData : u8 { # [doc = "Target data embedded in image data (proprietary)"] const CAMERA_TRACKING_TARGET_DATA_EMBEDDED = 1 ; # [doc = "Target data rendered in image"] const CAMERA_TRACKING_TARGET_DATA_RENDERED = 2 ; # [doc = "Target data within status message (Point or Rectangle)"] const CAMERA_TRACKING_TARGET_DATA_IN_STATUS = 4 ; } }
495impl CameraTrackingTargetData {
496    pub const DEFAULT: Self = Self::CAMERA_TRACKING_TARGET_DATA_EMBEDDED;
497}
498impl Default for CameraTrackingTargetData {
499    fn default() -> Self {
500        Self::DEFAULT
501    }
502}
503#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
504#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
505#[cfg_attr(feature = "serde", serde(tag = "type"))]
506#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
507#[repr(u32)]
508#[doc = "Zoom types for MAV_CMD_SET_CAMERA_ZOOM"]
509pub enum CameraZoomType {
510    #[doc = "Zoom one step increment (-1 for wide, 1 for tele)"]
511    ZOOM_TYPE_STEP = 0,
512    #[doc = "Continuous normalized zoom in/out rate until stopped. Range -1..1, negative: wide, positive: narrow/tele, 0 to stop zooming. Other values should be clipped to the range."]
513    ZOOM_TYPE_CONTINUOUS = 1,
514    #[doc = "Zoom value as proportion of full camera range (a percentage value between 0.0 and 100.0)"]
515    ZOOM_TYPE_RANGE = 2,
516    #[doc = "Zoom value/variable focal length in millimetres. Note that there is no message to get the valid zoom range of the camera, so this can type can only be used for cameras where the zoom range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)"]
517    ZOOM_TYPE_FOCAL_LENGTH = 3,
518    #[doc = "Zoom value as horizontal field of view in degrees."]
519    ZOOM_TYPE_HORIZONTAL_FOV = 4,
520}
521impl CameraZoomType {
522    pub const DEFAULT: Self = Self::ZOOM_TYPE_STEP;
523}
524impl Default for CameraZoomType {
525    fn default() -> Self {
526        Self::DEFAULT
527    }
528}
529#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
530#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
531#[cfg_attr(feature = "serde", serde(tag = "type"))]
532#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
533#[repr(u32)]
534pub enum CanFilterOp {
535    CAN_FILTER_REPLACE = 0,
536    CAN_FILTER_ADD = 1,
537    CAN_FILTER_REMOVE = 2,
538}
539impl CanFilterOp {
540    pub const DEFAULT: Self = Self::CAN_FILTER_REPLACE;
541}
542impl Default for CanFilterOp {
543    fn default() -> Self {
544        Self::DEFAULT
545    }
546}
547#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
548#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
549#[cfg_attr(feature = "serde", serde(tag = "type"))]
550#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
551#[repr(u32)]
552#[doc = "Possible responses from a CELLULAR_CONFIG message."]
553pub enum CellularConfigResponse {
554    #[doc = "Changes accepted."]
555    CELLULAR_CONFIG_RESPONSE_ACCEPTED = 0,
556    #[doc = "Invalid APN."]
557    CELLULAR_CONFIG_RESPONSE_APN_ERROR = 1,
558    #[doc = "Invalid PIN."]
559    CELLULAR_CONFIG_RESPONSE_PIN_ERROR = 2,
560    #[doc = "Changes rejected."]
561    CELLULAR_CONFIG_RESPONSE_REJECTED = 3,
562    #[doc = "PUK is required to unblock SIM card."]
563    CELLULAR_CONFIG_BLOCKED_PUK_REQUIRED = 4,
564}
565impl CellularConfigResponse {
566    pub const DEFAULT: Self = Self::CELLULAR_CONFIG_RESPONSE_ACCEPTED;
567}
568impl Default for CellularConfigResponse {
569    fn default() -> Self {
570        Self::DEFAULT
571    }
572}
573#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
574#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
575#[cfg_attr(feature = "serde", serde(tag = "type"))]
576#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
577#[repr(u32)]
578#[doc = "These flags are used to diagnose the failure state of CELLULAR_STATUS"]
579pub enum CellularNetworkFailedReason {
580    #[doc = "No error"]
581    CELLULAR_NETWORK_FAILED_REASON_NONE = 0,
582    #[doc = "Error state is unknown"]
583    CELLULAR_NETWORK_FAILED_REASON_UNKNOWN = 1,
584    #[doc = "SIM is required for the modem but missing"]
585    CELLULAR_NETWORK_FAILED_REASON_SIM_MISSING = 2,
586    #[doc = "SIM is available, but not usable for connection"]
587    CELLULAR_NETWORK_FAILED_REASON_SIM_ERROR = 3,
588}
589impl CellularNetworkFailedReason {
590    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_FAILED_REASON_NONE;
591}
592impl Default for CellularNetworkFailedReason {
593    fn default() -> Self {
594        Self::DEFAULT
595    }
596}
597#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
598#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
599#[cfg_attr(feature = "serde", serde(tag = "type"))]
600#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
601#[repr(u32)]
602#[doc = "Cellular network radio type"]
603pub enum CellularNetworkRadioType {
604    CELLULAR_NETWORK_RADIO_TYPE_NONE = 0,
605    CELLULAR_NETWORK_RADIO_TYPE_GSM = 1,
606    CELLULAR_NETWORK_RADIO_TYPE_CDMA = 2,
607    CELLULAR_NETWORK_RADIO_TYPE_WCDMA = 3,
608    CELLULAR_NETWORK_RADIO_TYPE_LTE = 4,
609}
610impl CellularNetworkRadioType {
611    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_RADIO_TYPE_NONE;
612}
613impl Default for CellularNetworkRadioType {
614    fn default() -> Self {
615        Self::DEFAULT
616    }
617}
618#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
619#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
620#[cfg_attr(feature = "serde", serde(tag = "type"))]
621#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
622#[repr(u32)]
623#[doc = "These flags encode the cellular network status"]
624pub enum CellularStatusFlag {
625    #[doc = "State unknown or not reportable."]
626    CELLULAR_STATUS_FLAG_UNKNOWN = 0,
627    #[doc = "Modem is unusable"]
628    CELLULAR_STATUS_FLAG_FAILED = 1,
629    #[doc = "Modem is being initialized"]
630    CELLULAR_STATUS_FLAG_INITIALIZING = 2,
631    #[doc = "Modem is locked"]
632    CELLULAR_STATUS_FLAG_LOCKED = 3,
633    #[doc = "Modem is not enabled and is powered down"]
634    CELLULAR_STATUS_FLAG_DISABLED = 4,
635    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_DISABLED state"]
636    CELLULAR_STATUS_FLAG_DISABLING = 5,
637    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_ENABLED state"]
638    CELLULAR_STATUS_FLAG_ENABLING = 6,
639    #[doc = "Modem is enabled and powered on but not registered with a network provider and not available for data connections"]
640    CELLULAR_STATUS_FLAG_ENABLED = 7,
641    #[doc = "Modem is searching for a network provider to register"]
642    CELLULAR_STATUS_FLAG_SEARCHING = 8,
643    #[doc = "Modem is registered with a network provider, and data connections and messaging may be available for use"]
644    CELLULAR_STATUS_FLAG_REGISTERED = 9,
645    #[doc = "Modem is disconnecting and deactivating the last active packet data bearer. This state will not be entered if more than one packet data bearer is active and one of the active bearers is deactivated"]
646    CELLULAR_STATUS_FLAG_DISCONNECTING = 10,
647    #[doc = "Modem is activating and connecting the first packet data bearer. Subsequent bearer activations when another bearer is already active do not cause this state to be entered"]
648    CELLULAR_STATUS_FLAG_CONNECTING = 11,
649    #[doc = "One or more packet data bearers is active and connected"]
650    CELLULAR_STATUS_FLAG_CONNECTED = 12,
651}
652impl CellularStatusFlag {
653    pub const DEFAULT: Self = Self::CELLULAR_STATUS_FLAG_UNKNOWN;
654}
655impl Default for CellularStatusFlag {
656    fn default() -> Self {
657        Self::DEFAULT
658    }
659}
660#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
661#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
662#[cfg_attr(feature = "serde", serde(tag = "type"))]
663#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
664#[repr(u32)]
665#[doc = "Supported component metadata types. These are used in the \"general\" metadata file returned by COMPONENT_METADATA to provide information about supported metadata types. The types are not used directly in MAVLink messages."]
666pub enum CompMetadataType {
667    #[doc = "General information about the component. General metadata includes information about other metadata types supported by the component. Files of this type must be supported, and must be downloadable from vehicle using a MAVLink FTP URI."]
668    COMP_METADATA_TYPE_GENERAL = 0,
669    #[doc = "Parameter meta data."]
670    COMP_METADATA_TYPE_PARAMETER = 1,
671    #[doc = "Meta data that specifies which commands and command parameters the vehicle supports. (WIP)"]
672    COMP_METADATA_TYPE_COMMANDS = 2,
673    #[doc = "Meta data that specifies external non-MAVLink peripherals."]
674    COMP_METADATA_TYPE_PERIPHERALS = 3,
675    #[doc = "Meta data for the events interface."]
676    COMP_METADATA_TYPE_EVENTS = 4,
677    #[doc = "Meta data for actuator configuration (motors, servos and vehicle geometry) and testing."]
678    COMP_METADATA_TYPE_ACTUATORS = 5,
679}
680impl CompMetadataType {
681    pub const DEFAULT: Self = Self::COMP_METADATA_TYPE_GENERAL;
682}
683impl Default for CompMetadataType {
684    fn default() -> Self {
685        Self::DEFAULT
686    }
687}
688#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
689#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
690#[cfg_attr(feature = "serde", serde(tag = "type"))]
691#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
692#[repr(u32)]
693#[doc = "Indicates the ESC connection type."]
694pub enum EscConnectionType {
695    #[doc = "Traditional PPM ESC."]
696    ESC_CONNECTION_TYPE_PPM = 0,
697    #[doc = "Serial Bus connected ESC."]
698    ESC_CONNECTION_TYPE_SERIAL = 1,
699    #[doc = "One Shot PPM ESC."]
700    ESC_CONNECTION_TYPE_ONESHOT = 2,
701    #[doc = "I2C ESC."]
702    ESC_CONNECTION_TYPE_I2C = 3,
703    #[doc = "CAN-Bus ESC."]
704    ESC_CONNECTION_TYPE_CAN = 4,
705    #[doc = "DShot ESC."]
706    ESC_CONNECTION_TYPE_DSHOT = 5,
707}
708impl EscConnectionType {
709    pub const DEFAULT: Self = Self::ESC_CONNECTION_TYPE_PPM;
710}
711impl Default for EscConnectionType {
712    fn default() -> Self {
713        Self::DEFAULT
714    }
715}
716bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report ESC failures."] pub struct EscFailureFlags : u16 { # [doc = "Over current failure."] const ESC_FAILURE_OVER_CURRENT = 1 ; # [doc = "Over voltage failure."] const ESC_FAILURE_OVER_VOLTAGE = 2 ; # [doc = "Over temperature failure."] const ESC_FAILURE_OVER_TEMPERATURE = 4 ; # [doc = "Over RPM failure."] const ESC_FAILURE_OVER_RPM = 8 ; # [doc = "Inconsistent command failure i.e. out of bounds."] const ESC_FAILURE_INCONSISTENT_CMD = 16 ; # [doc = "Motor stuck failure."] const ESC_FAILURE_MOTOR_STUCK = 32 ; # [doc = "Generic ESC failure."] const ESC_FAILURE_GENERIC = 64 ; } }
717impl EscFailureFlags {
718    pub const DEFAULT: Self = Self::ESC_FAILURE_OVER_CURRENT;
719}
720impl Default for EscFailureFlags {
721    fn default() -> Self {
722        Self::DEFAULT
723    }
724}
725bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in ESTIMATOR_STATUS message"] pub struct EstimatorStatusFlags : u16 { # [doc = "True if the attitude estimate is good"] const ESTIMATOR_ATTITUDE = 1 ; # [doc = "True if the horizontal velocity estimate is good"] const ESTIMATOR_VELOCITY_HORIZ = 2 ; # [doc = "True if the  vertical velocity estimate is good"] const ESTIMATOR_VELOCITY_VERT = 4 ; # [doc = "True if the horizontal position (relative) estimate is good"] const ESTIMATOR_POS_HORIZ_REL = 8 ; # [doc = "True if the horizontal position (absolute) estimate is good"] const ESTIMATOR_POS_HORIZ_ABS = 16 ; # [doc = "True if the vertical position (absolute) estimate is good"] const ESTIMATOR_POS_VERT_ABS = 32 ; # [doc = "True if the vertical position (above ground) estimate is good"] const ESTIMATOR_POS_VERT_AGL = 64 ; # [doc = "True if the EKF is in a constant position mode and is not using external measurements (eg GPS or optical flow)"] const ESTIMATOR_CONST_POS_MODE = 128 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (relative) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_REL = 256 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (absolute) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_ABS = 512 ; # [doc = "True if the EKF has detected a GPS glitch"] const ESTIMATOR_GPS_GLITCH = 1024 ; # [doc = "True if the EKF has detected bad accelerometer data"] const ESTIMATOR_ACCEL_ERROR = 2048 ; } }
726impl EstimatorStatusFlags {
727    pub const DEFAULT: Self = Self::ESTIMATOR_ATTITUDE;
728}
729impl Default for EstimatorStatusFlags {
730    fn default() -> Self {
731        Self::DEFAULT
732    }
733}
734#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
735#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
736#[cfg_attr(feature = "serde", serde(tag = "type"))]
737#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
738#[repr(u32)]
739#[doc = "List of possible failure type to inject."]
740pub enum FailureType {
741    #[doc = "No failure injected, used to reset a previous failure."]
742    FAILURE_TYPE_OK = 0,
743    #[doc = "Sets unit off, so completely non-responsive."]
744    FAILURE_TYPE_OFF = 1,
745    #[doc = "Unit is stuck e.g. keeps reporting the same value."]
746    FAILURE_TYPE_STUCK = 2,
747    #[doc = "Unit is reporting complete garbage."]
748    FAILURE_TYPE_GARBAGE = 3,
749    #[doc = "Unit is consistently wrong."]
750    FAILURE_TYPE_WRONG = 4,
751    #[doc = "Unit is slow, so e.g. reporting at slower than expected rate."]
752    FAILURE_TYPE_SLOW = 5,
753    #[doc = "Data of unit is delayed in time."]
754    FAILURE_TYPE_DELAYED = 6,
755    #[doc = "Unit is sometimes working, sometimes not."]
756    FAILURE_TYPE_INTERMITTENT = 7,
757}
758impl FailureType {
759    pub const DEFAULT: Self = Self::FAILURE_TYPE_OK;
760}
761impl Default for FailureType {
762    fn default() -> Self {
763        Self::DEFAULT
764    }
765}
766#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
767#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
768#[cfg_attr(feature = "serde", serde(tag = "type"))]
769#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
770#[repr(u32)]
771#[doc = "List of possible units where failures can be injected."]
772pub enum FailureUnit {
773    FAILURE_UNIT_SENSOR_GYRO = 0,
774    FAILURE_UNIT_SENSOR_ACCEL = 1,
775    FAILURE_UNIT_SENSOR_MAG = 2,
776    FAILURE_UNIT_SENSOR_BARO = 3,
777    FAILURE_UNIT_SENSOR_GPS = 4,
778    FAILURE_UNIT_SENSOR_OPTICAL_FLOW = 5,
779    FAILURE_UNIT_SENSOR_VIO = 6,
780    FAILURE_UNIT_SENSOR_DISTANCE_SENSOR = 7,
781    FAILURE_UNIT_SENSOR_AIRSPEED = 8,
782    FAILURE_UNIT_SYSTEM_BATTERY = 100,
783    FAILURE_UNIT_SYSTEM_MOTOR = 101,
784    FAILURE_UNIT_SYSTEM_SERVO = 102,
785    FAILURE_UNIT_SYSTEM_AVOIDANCE = 103,
786    FAILURE_UNIT_SYSTEM_RC_SIGNAL = 104,
787    FAILURE_UNIT_SYSTEM_MAVLINK_SIGNAL = 105,
788}
789impl FailureUnit {
790    pub const DEFAULT: Self = Self::FAILURE_UNIT_SENSOR_GYRO;
791}
792impl Default for FailureUnit {
793    fn default() -> Self {
794        Self::DEFAULT
795    }
796}
797#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
798#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
799#[cfg_attr(feature = "serde", serde(tag = "type"))]
800#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
801#[repr(u32)]
802pub enum FenceBreach {
803    #[doc = "No last fence breach"]
804    FENCE_BREACH_NONE = 0,
805    #[doc = "Breached minimum altitude"]
806    FENCE_BREACH_MINALT = 1,
807    #[doc = "Breached maximum altitude"]
808    FENCE_BREACH_MAXALT = 2,
809    #[doc = "Breached fence boundary"]
810    FENCE_BREACH_BOUNDARY = 3,
811}
812impl FenceBreach {
813    pub const DEFAULT: Self = Self::FENCE_BREACH_NONE;
814}
815impl Default for FenceBreach {
816    fn default() -> Self {
817        Self::DEFAULT
818    }
819}
820#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
821#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
822#[cfg_attr(feature = "serde", serde(tag = "type"))]
823#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
824#[repr(u32)]
825#[doc = "Actions being taken to mitigate/prevent fence breach"]
826pub enum FenceMitigate {
827    #[doc = "Unknown"]
828    FENCE_MITIGATE_UNKNOWN = 0,
829    #[doc = "No actions being taken"]
830    FENCE_MITIGATE_NONE = 1,
831    #[doc = "Velocity limiting active to prevent breach"]
832    FENCE_MITIGATE_VEL_LIMIT = 2,
833}
834impl FenceMitigate {
835    pub const DEFAULT: Self = Self::FENCE_MITIGATE_UNKNOWN;
836}
837impl Default for FenceMitigate {
838    fn default() -> Self {
839        Self::DEFAULT
840    }
841}
842#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
843#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
844#[cfg_attr(feature = "serde", serde(tag = "type"))]
845#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
846#[repr(u32)]
847#[doc = "Fence types to enable or disable when using MAV_CMD_DO_FENCE_ENABLE.         Note that at least one of these flags must be set in MAV_CMD_DO_FENCE_ENABLE.param2.         If none are set, the flight stack will ignore the field and enable/disable its default set of fences (usually all of them)."]
848pub enum FenceType {
849    #[doc = "Maximum altitude fence"]
850    FENCE_TYPE_ALT_MAX = 1,
851    #[doc = "Circle fence"]
852    FENCE_TYPE_CIRCLE = 2,
853    #[doc = "Polygon fence"]
854    FENCE_TYPE_POLYGON = 4,
855    #[doc = "Minimum altitude fence"]
856    FENCE_TYPE_ALT_MIN = 8,
857}
858impl FenceType {
859    pub const DEFAULT: Self = Self::FENCE_TYPE_ALT_MAX;
860}
861impl Default for FenceType {
862    fn default() -> Self {
863        Self::DEFAULT
864    }
865}
866#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
867#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
868#[cfg_attr(feature = "serde", serde(tag = "type"))]
869#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
870#[repr(u32)]
871#[doc = "These values define the type of firmware release.  These values indicate the first version or release of this type.  For example the first alpha release would be 64, the second would be 65."]
872pub enum FirmwareVersionType {
873    #[doc = "development release"]
874    FIRMWARE_VERSION_TYPE_DEV = 0,
875    #[doc = "alpha release"]
876    FIRMWARE_VERSION_TYPE_ALPHA = 64,
877    #[doc = "beta release"]
878    FIRMWARE_VERSION_TYPE_BETA = 128,
879    #[doc = "release candidate"]
880    FIRMWARE_VERSION_TYPE_RC = 192,
881    #[doc = "official stable release"]
882    FIRMWARE_VERSION_TYPE_OFFICIAL = 255,
883}
884impl FirmwareVersionType {
885    pub const DEFAULT: Self = Self::FIRMWARE_VERSION_TYPE_DEV;
886}
887impl Default for FirmwareVersionType {
888    fn default() -> Self {
889        Self::DEFAULT
890    }
891}
892bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) capability flags (bitmap)."] pub struct GimbalDeviceCapFlags : u16 { # [doc = "Gimbal device supports a retracted position."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Gimbal device supports a horizontal, forward looking position, stabilized."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Gimbal device supports rotating around roll axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Gimbal device supports to follow a roll angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Gimbal device supports locking to a roll angle (generally that's the default with roll stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Gimbal device supports rotating around pitch axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Gimbal device supports to follow a pitch angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Gimbal device supports locking to a pitch angle (generally that's the default with pitch stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Gimbal device supports rotating around yaw axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Gimbal device supports to follow a yaw angle relative to the vehicle (generally that's the default)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Gimbal device supports locking to an absolute heading, i.e., yaw angle relative to North (earth frame, often this is an option available)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Gimbal device supports yawing/panning infinitely (e.g. using slip disk)."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Gimbal device supports yaw angles and angular velocities relative to North (earth frame). This usually requires support by an autopilot via AUTOPILOT_STATE_FOR_GIMBAL_DEVICE. Support can go on and off during runtime, which is reported by the flag GIMBAL_DEVICE_FLAGS_CAN_ACCEPT_YAW_IN_EARTH_FRAME."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Gimbal device supports radio control inputs as an alternative input for controlling the gimbal orientation."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; } }
893impl GimbalDeviceCapFlags {
894    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT;
895}
896impl Default for GimbalDeviceCapFlags {
897    fn default() -> Self {
898        Self::DEFAULT
899    }
900}
901bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) error flags (bitmap, 0 means no error)"] pub struct GimbalDeviceErrorFlags : u32 { # [doc = "Gimbal device is limited by hardware roll limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT = 1 ; # [doc = "Gimbal device is limited by hardware pitch limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_PITCH_LIMIT = 2 ; # [doc = "Gimbal device is limited by hardware yaw limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_YAW_LIMIT = 4 ; # [doc = "There is an error with the gimbal encoders."] const GIMBAL_DEVICE_ERROR_FLAGS_ENCODER_ERROR = 8 ; # [doc = "There is an error with the gimbal power source."] const GIMBAL_DEVICE_ERROR_FLAGS_POWER_ERROR = 16 ; # [doc = "There is an error with the gimbal motors."] const GIMBAL_DEVICE_ERROR_FLAGS_MOTOR_ERROR = 32 ; # [doc = "There is an error with the gimbal's software."] const GIMBAL_DEVICE_ERROR_FLAGS_SOFTWARE_ERROR = 64 ; # [doc = "There is an error with the gimbal's communication."] const GIMBAL_DEVICE_ERROR_FLAGS_COMMS_ERROR = 128 ; # [doc = "Gimbal device is currently calibrating."] const GIMBAL_DEVICE_ERROR_FLAGS_CALIBRATION_RUNNING = 256 ; # [doc = "Gimbal device is not assigned to a gimbal manager."] const GIMBAL_DEVICE_ERROR_FLAGS_NO_MANAGER = 512 ; } }
902impl GimbalDeviceErrorFlags {
903    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT;
904}
905impl Default for GimbalDeviceErrorFlags {
906    fn default() -> Self {
907        Self::DEFAULT
908    }
909}
910bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for gimbal device (lower level) operation."] pub struct GimbalDeviceFlags : u16 { # [doc = "Set to retracted safe position (no stabilization), takes precedence over all other flags."] const GIMBAL_DEVICE_FLAGS_RETRACT = 1 ; # [doc = "Set to neutral/default position, taking precedence over all other flags except RETRACT. Neutral is commonly forward-facing and horizontal (roll=pitch=yaw=0) but may be any orientation."] const GIMBAL_DEVICE_FLAGS_NEUTRAL = 2 ; # [doc = "Lock roll angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_ROLL_LOCK = 4 ; # [doc = "Lock pitch angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_PITCH_LOCK = 8 ; # [doc = "Lock yaw angle to absolute angle relative to North (not relative to vehicle). If this flag is set, the yaw angle and z component of angular velocity are relative to North (earth frame, x-axis pointing North), else they are relative to the vehicle heading (vehicle frame, earth frame rotated so that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_LOCK = 16 ; # [doc = "Yaw angle and z component of angular velocity are relative to the vehicle heading (vehicle frame, earth frame rotated such that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Yaw angle and z component of angular velocity are relative to North (earth frame, x-axis is pointing North)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Gimbal device can accept yaw angle inputs relative to North (earth frame). This flag is only for reporting (attempts to set this flag are ignored)."] const GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "The gimbal orientation is set exclusively by the RC signals feed to the gimbal's radio control inputs. MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE) are ignored."] const GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "The gimbal orientation is determined by combining/mixing the RC signals feed to the gimbal's radio control inputs and the MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE). How these two controls are combined or mixed is not defined by the protocol but is up to the implementation."] const GIMBAL_DEVICE_FLAGS_RC_MIXED = 512 ; } }
911impl GimbalDeviceFlags {
912    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_FLAGS_RETRACT;
913}
914impl Default for GimbalDeviceFlags {
915    fn default() -> Self {
916        Self::DEFAULT
917    }
918}
919bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal manager high level capability flags (bitmap). The first 16 bits are identical to the GIMBAL_DEVICE_CAP_FLAGS. However, the gimbal manager does not need to copy the flags from the gimbal but can also enhance the capabilities and thus add flags."] pub struct GimbalManagerCapFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; # [doc = "Gimbal manager supports to point to a local position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_LOCAL = 65536 ; # [doc = "Gimbal manager supports to point to a global latitude, longitude, altitude position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_GLOBAL = 131072 ; } }
920impl GimbalManagerCapFlags {
921    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT;
922}
923impl Default for GimbalManagerCapFlags {
924    fn default() -> Self {
925        Self::DEFAULT
926    }
927}
928bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for high level gimbal manager operation The first 16 bits are identical to the GIMBAL_DEVICE_FLAGS."] pub struct GimbalManagerFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_FLAGS_RETRACT."] const GIMBAL_MANAGER_FLAGS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_NEUTRAL."] const GIMBAL_MANAGER_FLAGS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ROLL_LOCK."] const GIMBAL_MANAGER_FLAGS_ROLL_LOCK = 4 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_PITCH_LOCK."] const GIMBAL_MANAGER_FLAGS_PITCH_LOCK = 8 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_LOCK."] const GIMBAL_MANAGER_FLAGS_YAW_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE."] const GIMBAL_MANAGER_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_MIXED."] const GIMBAL_MANAGER_FLAGS_RC_MIXED = 512 ; } }
929impl GimbalManagerFlags {
930    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_FLAGS_RETRACT;
931}
932impl Default for GimbalManagerFlags {
933    fn default() -> Self {
934        Self::DEFAULT
935    }
936}
937#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
938#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
939#[cfg_attr(feature = "serde", serde(tag = "type"))]
940#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
941#[repr(u32)]
942#[doc = "Type of GPS fix"]
943pub enum GpsFixType {
944    #[doc = "No GPS connected"]
945    GPS_FIX_TYPE_NO_GPS = 0,
946    #[doc = "No position information, GPS is connected"]
947    GPS_FIX_TYPE_NO_FIX = 1,
948    #[doc = "2D position"]
949    GPS_FIX_TYPE_2D_FIX = 2,
950    #[doc = "3D position"]
951    GPS_FIX_TYPE_3D_FIX = 3,
952    #[doc = "DGPS/SBAS aided 3D position"]
953    GPS_FIX_TYPE_DGPS = 4,
954    #[doc = "RTK float, 3D position"]
955    GPS_FIX_TYPE_RTK_FLOAT = 5,
956    #[doc = "RTK Fixed, 3D position"]
957    GPS_FIX_TYPE_RTK_FIXED = 6,
958    #[doc = "Static fixed, typically used for base stations"]
959    GPS_FIX_TYPE_STATIC = 7,
960    #[doc = "PPP, 3D position."]
961    GPS_FIX_TYPE_PPP = 8,
962}
963impl GpsFixType {
964    pub const DEFAULT: Self = Self::GPS_FIX_TYPE_NO_GPS;
965}
966impl Default for GpsFixType {
967    fn default() -> Self {
968        Self::DEFAULT
969    }
970}
971bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] pub struct GpsInputIgnoreFlags : u16 { # [doc = "ignore altitude field"] const GPS_INPUT_IGNORE_FLAG_ALT = 1 ; # [doc = "ignore hdop field"] const GPS_INPUT_IGNORE_FLAG_HDOP = 2 ; # [doc = "ignore vdop field"] const GPS_INPUT_IGNORE_FLAG_VDOP = 4 ; # [doc = "ignore horizontal velocity field (vn and ve)"] const GPS_INPUT_IGNORE_FLAG_VEL_HORIZ = 8 ; # [doc = "ignore vertical velocity field (vd)"] const GPS_INPUT_IGNORE_FLAG_VEL_VERT = 16 ; # [doc = "ignore speed accuracy field"] const GPS_INPUT_IGNORE_FLAG_SPEED_ACCURACY = 32 ; # [doc = "ignore horizontal accuracy field"] const GPS_INPUT_IGNORE_FLAG_HORIZONTAL_ACCURACY = 64 ; # [doc = "ignore vertical accuracy field"] const GPS_INPUT_IGNORE_FLAG_VERTICAL_ACCURACY = 128 ; } }
972impl GpsInputIgnoreFlags {
973    pub const DEFAULT: Self = Self::GPS_INPUT_IGNORE_FLAG_ALT;
974}
975impl Default for GpsInputIgnoreFlags {
976    fn default() -> Self {
977        Self::DEFAULT
978    }
979}
980#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
981#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
982#[cfg_attr(feature = "serde", serde(tag = "type"))]
983#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
984#[repr(u32)]
985#[doc = "Gripper actions."]
986pub enum GripperActions {
987    #[doc = "Gripper release cargo."]
988    GRIPPER_ACTION_RELEASE = 0,
989    #[doc = "Gripper grab onto cargo."]
990    GRIPPER_ACTION_GRAB = 1,
991}
992impl GripperActions {
993    pub const DEFAULT: Self = Self::GRIPPER_ACTION_RELEASE;
994}
995impl Default for GripperActions {
996    fn default() -> Self {
997        Self::DEFAULT
998    }
999}
1000bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIGHRES_IMU message indicate which fields have updated since the last message"] pub struct HighresImuUpdatedFlags : u16 { # [doc = "The value in the xacc field has been updated"] const HIGHRES_IMU_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIGHRES_IMU_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated since"] const HIGHRES_IMU_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIGHRES_IMU_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIGHRES_IMU_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIGHRES_IMU_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIGHRES_IMU_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIGHRES_IMU_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIGHRES_IMU_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIGHRES_IMU_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIGHRES_IMU_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIGHRES_IMU_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIGHRES_IMU_UPDATED_TEMPERATURE = 4096 ; } }
1001impl HighresImuUpdatedFlags {
1002    pub const DEFAULT: Self = Self::HIGHRES_IMU_UPDATED_XACC;
1003}
1004impl Default for HighresImuUpdatedFlags {
1005    fn default() -> Self {
1006        Self::DEFAULT
1007    }
1008}
1009bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags used in HIL_ACTUATOR_CONTROLS message."] pub struct HilActuatorControlsFlags : u64 { # [doc = "Simulation is using lockstep"] const HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP = 1 ; } }
1010impl HilActuatorControlsFlags {
1011    pub const DEFAULT: Self = Self::HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP;
1012}
1013impl Default for HilActuatorControlsFlags {
1014    fn default() -> Self {
1015        Self::DEFAULT
1016    }
1017}
1018bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIL_SENSOR message indicate which fields have updated since the last message"] pub struct HilSensorUpdatedFlags : u32 { # [doc = "The value in the xacc field has been updated"] const HIL_SENSOR_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIL_SENSOR_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated"] const HIL_SENSOR_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIL_SENSOR_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIL_SENSOR_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIL_SENSOR_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIL_SENSOR_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIL_SENSOR_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIL_SENSOR_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIL_SENSOR_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIL_SENSOR_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIL_SENSOR_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIL_SENSOR_UPDATED_TEMPERATURE = 4096 ; # [doc = "Full reset of attitude/position/velocities/etc was performed in sim (Bit 31)."] const HIL_SENSOR_UPDATED_RESET = 2147483648 ; } }
1019impl HilSensorUpdatedFlags {
1020    pub const DEFAULT: Self = Self::HIL_SENSOR_UPDATED_XACC;
1021}
1022impl Default for HilSensorUpdatedFlags {
1023    fn default() -> Self {
1024        Self::DEFAULT
1025    }
1026}
1027bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report failure cases over the high latency telemetry."] pub struct HlFailureFlag : u16 { # [doc = "GPS failure."] const HL_FAILURE_FLAG_GPS = 1 ; # [doc = "Differential pressure sensor failure."] const HL_FAILURE_FLAG_DIFFERENTIAL_PRESSURE = 2 ; # [doc = "Absolute pressure sensor failure."] const HL_FAILURE_FLAG_ABSOLUTE_PRESSURE = 4 ; # [doc = "Accelerometer sensor failure."] const HL_FAILURE_FLAG_3D_ACCEL = 8 ; # [doc = "Gyroscope sensor failure."] const HL_FAILURE_FLAG_3D_GYRO = 16 ; # [doc = "Magnetometer sensor failure."] const HL_FAILURE_FLAG_3D_MAG = 32 ; # [doc = "Terrain subsystem failure."] const HL_FAILURE_FLAG_TERRAIN = 64 ; # [doc = "Battery failure/critical low battery."] const HL_FAILURE_FLAG_BATTERY = 128 ; # [doc = "RC receiver failure/no RC connection."] const HL_FAILURE_FLAG_RC_RECEIVER = 256 ; # [doc = "Offboard link failure."] const HL_FAILURE_FLAG_OFFBOARD_LINK = 512 ; # [doc = "Engine failure."] const HL_FAILURE_FLAG_ENGINE = 1024 ; # [doc = "Geofence violation."] const HL_FAILURE_FLAG_GEOFENCE = 2048 ; # [doc = "Estimator failure, for example measurement rejection or large variances."] const HL_FAILURE_FLAG_ESTIMATOR = 4096 ; # [doc = "Mission failure."] const HL_FAILURE_FLAG_MISSION = 8192 ; } }
1028impl HlFailureFlag {
1029    pub const DEFAULT: Self = Self::HL_FAILURE_FLAG_GPS;
1030}
1031impl Default for HlFailureFlag {
1032    fn default() -> Self {
1033        Self::DEFAULT
1034    }
1035}
1036bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Illuminator module error flags (bitmap, 0 means no error)"] pub struct IlluminatorErrorFlags : u32 { # [doc = "Illuminator thermal throttling error."] const ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING = 1 ; # [doc = "Illuminator over temperature shutdown error."] const ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN = 2 ; # [doc = "Illuminator thermistor failure."] const ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE = 4 ; } }
1037impl IlluminatorErrorFlags {
1038    pub const DEFAULT: Self = Self::ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING;
1039}
1040impl Default for IlluminatorErrorFlags {
1041    fn default() -> Self {
1042        Self::DEFAULT
1043    }
1044}
1045#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1046#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1047#[cfg_attr(feature = "serde", serde(tag = "type"))]
1048#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1049#[repr(u32)]
1050#[doc = "Modes of illuminator"]
1051pub enum IlluminatorMode {
1052    #[doc = "Illuminator mode is not specified/unknown"]
1053    ILLUMINATOR_MODE_UNKNOWN = 0,
1054    #[doc = "Illuminator behavior is controlled by MAV_CMD_DO_ILLUMINATOR_CONFIGURE settings"]
1055    ILLUMINATOR_MODE_INTERNAL_CONTROL = 1,
1056    #[doc = "Illuminator behavior is controlled by external factors: e.g. an external hardware signal"]
1057    ILLUMINATOR_MODE_EXTERNAL_SYNC = 2,
1058}
1059impl IlluminatorMode {
1060    pub const DEFAULT: Self = Self::ILLUMINATOR_MODE_UNKNOWN;
1061}
1062impl Default for IlluminatorMode {
1063    fn default() -> Self {
1064        Self::DEFAULT
1065    }
1066}
1067#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1068#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1069#[cfg_attr(feature = "serde", serde(tag = "type"))]
1070#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1071#[repr(u32)]
1072#[doc = "Type of landing target"]
1073pub enum LandingTargetType {
1074    #[doc = "Landing target signaled by light beacon (ex: IR-LOCK)"]
1075    LANDING_TARGET_TYPE_LIGHT_BEACON = 0,
1076    #[doc = "Landing target signaled by radio beacon (ex: ILS, NDB)"]
1077    LANDING_TARGET_TYPE_RADIO_BEACON = 1,
1078    #[doc = "Landing target represented by a fiducial marker (ex: ARTag)"]
1079    LANDING_TARGET_TYPE_VISION_FIDUCIAL = 2,
1080    #[doc = "Landing target represented by a pre-defined visual shape/feature (ex: X-marker, H-marker, square)"]
1081    LANDING_TARGET_TYPE_VISION_OTHER = 3,
1082}
1083impl LandingTargetType {
1084    pub const DEFAULT: Self = Self::LANDING_TARGET_TYPE_LIGHT_BEACON;
1085}
1086impl Default for LandingTargetType {
1087    fn default() -> Self {
1088        Self::DEFAULT
1089    }
1090}
1091#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1092#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1093#[cfg_attr(feature = "serde", serde(tag = "type"))]
1094#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1095#[repr(u32)]
1096pub enum MagCalStatus {
1097    MAG_CAL_NOT_STARTED = 0,
1098    MAG_CAL_WAITING_TO_START = 1,
1099    MAG_CAL_RUNNING_STEP_ONE = 2,
1100    MAG_CAL_RUNNING_STEP_TWO = 3,
1101    MAG_CAL_SUCCESS = 4,
1102    MAG_CAL_FAILED = 5,
1103    MAG_CAL_BAD_ORIENTATION = 6,
1104    MAG_CAL_BAD_RADIUS = 7,
1105}
1106impl MagCalStatus {
1107    pub const DEFAULT: Self = Self::MAG_CAL_NOT_STARTED;
1108}
1109impl Default for MagCalStatus {
1110    fn default() -> Self {
1111        Self::DEFAULT
1112    }
1113}
1114#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1115#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1116#[cfg_attr(feature = "serde", serde(tag = "type"))]
1117#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1118#[repr(u32)]
1119pub enum MavArmAuthDeniedReason {
1120    #[doc = "Not a specific reason"]
1121    MAV_ARM_AUTH_DENIED_REASON_GENERIC = 0,
1122    #[doc = "Authorizer will send the error as string to GCS"]
1123    MAV_ARM_AUTH_DENIED_REASON_NONE = 1,
1124    #[doc = "At least one waypoint have a invalid value"]
1125    MAV_ARM_AUTH_DENIED_REASON_INVALID_WAYPOINT = 2,
1126    #[doc = "Timeout in the authorizer process(in case it depends on network)"]
1127    MAV_ARM_AUTH_DENIED_REASON_TIMEOUT = 3,
1128    #[doc = "Airspace of the mission in use by another vehicle, second result parameter can have the waypoint id that caused it to be denied."]
1129    MAV_ARM_AUTH_DENIED_REASON_AIRSPACE_IN_USE = 4,
1130    #[doc = "Weather is not good to fly"]
1131    MAV_ARM_AUTH_DENIED_REASON_BAD_WEATHER = 5,
1132}
1133impl MavArmAuthDeniedReason {
1134    pub const DEFAULT: Self = Self::MAV_ARM_AUTH_DENIED_REASON_GENERIC;
1135}
1136impl Default for MavArmAuthDeniedReason {
1137    fn default() -> Self {
1138        Self::DEFAULT
1139    }
1140}
1141#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1142#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1143#[cfg_attr(feature = "serde", serde(tag = "type"))]
1144#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1145#[repr(u32)]
1146#[doc = "Micro air vehicle / autopilot classes. This identifies the individual model."]
1147pub enum MavAutopilot {
1148    #[doc = "Generic autopilot, full support for everything"]
1149    MAV_AUTOPILOT_GENERIC = 0,
1150    #[doc = "Reserved for future use."]
1151    MAV_AUTOPILOT_RESERVED = 1,
1152    #[doc = "SLUGS autopilot, <http://slugsuav.soe.ucsc.edu>"]
1153    MAV_AUTOPILOT_SLUGS = 2,
1154    #[doc = "ArduPilot - Plane/Copter/Rover/Sub/Tracker, <https://ardupilot.org>"]
1155    MAV_AUTOPILOT_ARDUPILOTMEGA = 3,
1156    #[doc = "OpenPilot, <http://openpilot.org>"]
1157    MAV_AUTOPILOT_OPENPILOT = 4,
1158    #[doc = "Generic autopilot only supporting simple waypoints"]
1159    MAV_AUTOPILOT_GENERIC_WAYPOINTS_ONLY = 5,
1160    #[doc = "Generic autopilot supporting waypoints and other simple navigation commands"]
1161    MAV_AUTOPILOT_GENERIC_WAYPOINTS_AND_SIMPLE_NAVIGATION_ONLY = 6,
1162    #[doc = "Generic autopilot supporting the full mission command set"]
1163    MAV_AUTOPILOT_GENERIC_MISSION_FULL = 7,
1164    #[doc = "No valid autopilot, e.g. a GCS or other MAVLink component"]
1165    MAV_AUTOPILOT_INVALID = 8,
1166    #[doc = "PPZ UAV - <http://nongnu.org/paparazzi>"]
1167    MAV_AUTOPILOT_PPZ = 9,
1168    #[doc = "UAV Dev Board"]
1169    MAV_AUTOPILOT_UDB = 10,
1170    #[doc = "FlexiPilot"]
1171    MAV_AUTOPILOT_FP = 11,
1172    #[doc = "PX4 Autopilot - <http://px4.io/>"]
1173    MAV_AUTOPILOT_PX4 = 12,
1174    #[doc = "SMACCMPilot - <http://smaccmpilot.org>"]
1175    MAV_AUTOPILOT_SMACCMPILOT = 13,
1176    #[doc = "AutoQuad -- <http://autoquad.org>"]
1177    MAV_AUTOPILOT_AUTOQUAD = 14,
1178    #[doc = "Armazila -- <http://armazila.com>"]
1179    MAV_AUTOPILOT_ARMAZILA = 15,
1180    #[doc = "Aerob -- <http://aerob.ru>"]
1181    MAV_AUTOPILOT_AEROB = 16,
1182    #[doc = "ASLUAV autopilot -- <http://www.asl.ethz.ch>"]
1183    MAV_AUTOPILOT_ASLUAV = 17,
1184    #[doc = "SmartAP Autopilot - <http://sky-drones.com>"]
1185    MAV_AUTOPILOT_SMARTAP = 18,
1186    #[doc = "AirRails - <http://uaventure.com>"]
1187    MAV_AUTOPILOT_AIRRAILS = 19,
1188    #[doc = "Fusion Reflex - <https://fusion.engineering>"]
1189    MAV_AUTOPILOT_REFLEX = 20,
1190}
1191impl MavAutopilot {
1192    pub const DEFAULT: Self = Self::MAV_AUTOPILOT_GENERIC;
1193}
1194impl Default for MavAutopilot {
1195    fn default() -> Self {
1196        Self::DEFAULT
1197    }
1198}
1199#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1200#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1201#[cfg_attr(feature = "serde", serde(tag = "type"))]
1202#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1203#[repr(u32)]
1204#[doc = "Enumeration for battery charge states."]
1205pub enum MavBatteryChargeState {
1206    #[doc = "Low battery state is not provided"]
1207    MAV_BATTERY_CHARGE_STATE_UNDEFINED = 0,
1208    #[doc = "Battery is not in low state. Normal operation."]
1209    MAV_BATTERY_CHARGE_STATE_OK = 1,
1210    #[doc = "Battery state is low, warn and monitor close."]
1211    MAV_BATTERY_CHARGE_STATE_LOW = 2,
1212    #[doc = "Battery state is critical, return or abort immediately."]
1213    MAV_BATTERY_CHARGE_STATE_CRITICAL = 3,
1214    #[doc = "Battery state is too low for ordinary abort sequence. Perform fastest possible emergency stop to prevent damage."]
1215    MAV_BATTERY_CHARGE_STATE_EMERGENCY = 4,
1216    #[doc = "Battery failed, damage unavoidable. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1217    MAV_BATTERY_CHARGE_STATE_FAILED = 5,
1218    #[doc = "Battery is diagnosed to be defective or an error occurred, usage is discouraged / prohibited. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1219    MAV_BATTERY_CHARGE_STATE_UNHEALTHY = 6,
1220    #[doc = "Battery is charging."]
1221    MAV_BATTERY_CHARGE_STATE_CHARGING = 7,
1222}
1223impl MavBatteryChargeState {
1224    pub const DEFAULT: Self = Self::MAV_BATTERY_CHARGE_STATE_UNDEFINED;
1225}
1226impl Default for MavBatteryChargeState {
1227    fn default() -> Self {
1228        Self::DEFAULT
1229    }
1230}
1231bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Smart battery supply status/fault flags (bitmask) for health indication. The battery must also report either MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY if any of these are set."] pub struct MavBatteryFault : u32 { # [doc = "Battery has deep discharged."] const MAV_BATTERY_FAULT_DEEP_DISCHARGE = 1 ; # [doc = "Voltage spikes."] const MAV_BATTERY_FAULT_SPIKES = 2 ; # [doc = "One or more cells have failed. Battery should also report MAV_BATTERY_CHARGE_STATE_FAILE (and should not be used)."] const MAV_BATTERY_FAULT_CELL_FAIL = 4 ; # [doc = "Over-current fault."] const MAV_BATTERY_FAULT_OVER_CURRENT = 8 ; # [doc = "Over-temperature fault."] const MAV_BATTERY_FAULT_OVER_TEMPERATURE = 16 ; # [doc = "Under-temperature fault."] const MAV_BATTERY_FAULT_UNDER_TEMPERATURE = 32 ; # [doc = "Vehicle voltage is not compatible with this battery (batteries on same power rail should have similar voltage)."] const MAV_BATTERY_FAULT_INCOMPATIBLE_VOLTAGE = 64 ; # [doc = "Battery firmware is not compatible with current autopilot firmware."] const MAV_BATTERY_FAULT_INCOMPATIBLE_FIRMWARE = 128 ; # [doc = "Battery is not compatible due to cell configuration (e.g. 5s1p when vehicle requires 6s)."] const BATTERY_FAULT_INCOMPATIBLE_CELLS_CONFIGURATION = 256 ; } }
1232impl MavBatteryFault {
1233    pub const DEFAULT: Self = Self::MAV_BATTERY_FAULT_DEEP_DISCHARGE;
1234}
1235impl Default for MavBatteryFault {
1236    fn default() -> Self {
1237        Self::DEFAULT
1238    }
1239}
1240#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1241#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1242#[cfg_attr(feature = "serde", serde(tag = "type"))]
1243#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1244#[repr(u32)]
1245#[doc = "Enumeration of battery functions"]
1246pub enum MavBatteryFunction {
1247    #[doc = "Battery function is unknown"]
1248    MAV_BATTERY_FUNCTION_UNKNOWN = 0,
1249    #[doc = "Battery supports all flight systems"]
1250    MAV_BATTERY_FUNCTION_ALL = 1,
1251    #[doc = "Battery for the propulsion system"]
1252    MAV_BATTERY_FUNCTION_PROPULSION = 2,
1253    #[doc = "Avionics battery"]
1254    MAV_BATTERY_FUNCTION_AVIONICS = 3,
1255    #[doc = "Payload battery"]
1256    MAV_BATTERY_FUNCTION_PAYLOAD = 4,
1257}
1258impl MavBatteryFunction {
1259    pub const DEFAULT: Self = Self::MAV_BATTERY_FUNCTION_UNKNOWN;
1260}
1261impl Default for MavBatteryFunction {
1262    fn default() -> Self {
1263        Self::DEFAULT
1264    }
1265}
1266#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1267#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1268#[cfg_attr(feature = "serde", serde(tag = "type"))]
1269#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1270#[repr(u32)]
1271#[doc = "Battery mode. Note, the normal operation mode (i.e. when flying) should be reported as MAV_BATTERY_MODE_UNKNOWN to allow message trimming in normal flight."]
1272pub enum MavBatteryMode {
1273    #[doc = "Battery mode not supported/unknown battery mode/normal operation."]
1274    MAV_BATTERY_MODE_UNKNOWN = 0,
1275    #[doc = "Battery is auto discharging (towards storage level)."]
1276    MAV_BATTERY_MODE_AUTO_DISCHARGING = 1,
1277    #[doc = "Battery in hot-swap mode (current limited to prevent spikes that might damage sensitive electrical circuits)."]
1278    MAV_BATTERY_MODE_HOT_SWAP = 2,
1279}
1280impl MavBatteryMode {
1281    pub const DEFAULT: Self = Self::MAV_BATTERY_MODE_UNKNOWN;
1282}
1283impl Default for MavBatteryMode {
1284    fn default() -> Self {
1285        Self::DEFAULT
1286    }
1287}
1288#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1289#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1290#[cfg_attr(feature = "serde", serde(tag = "type"))]
1291#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1292#[repr(u32)]
1293#[doc = "Enumeration of battery types"]
1294pub enum MavBatteryType {
1295    #[doc = "Not specified."]
1296    MAV_BATTERY_TYPE_UNKNOWN = 0,
1297    #[doc = "Lithium polymer battery"]
1298    MAV_BATTERY_TYPE_LIPO = 1,
1299    #[doc = "Lithium-iron-phosphate battery"]
1300    MAV_BATTERY_TYPE_LIFE = 2,
1301    #[doc = "Lithium-ION battery"]
1302    MAV_BATTERY_TYPE_LION = 3,
1303    #[doc = "Nickel metal hydride battery"]
1304    MAV_BATTERY_TYPE_NIMH = 4,
1305}
1306impl MavBatteryType {
1307    pub const DEFAULT: Self = Self::MAV_BATTERY_TYPE_UNKNOWN;
1308}
1309impl Default for MavBatteryType {
1310    fn default() -> Self {
1311        Self::DEFAULT
1312    }
1313}
1314#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1315#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1316#[cfg_attr(feature = "serde", serde(tag = "type"))]
1317#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1318#[repr(u32)]
1319#[doc = "Commands to be executed by the MAV. They can be executed on user request, or as part of a mission script. If the action is used in a mission, the parameter mapping to the waypoint/mission message is as follows: Param 1, Param 2, Param 3, Param 4, X: Param 5, Y:Param 6, Z:Param 7. This command list is similar what ARINC 424 is for commercial aircraft: A data format how to interpret waypoint/mission data. NaN and INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current yaw or latitude rather than a specific value). See <https://mavlink.io/en/guide/xml_schema.html#MAV_CMD> for information about the structure of the MAV_CMD entries"]
1320pub enum MavCmd {
1321    #[doc = "Navigate to waypoint. This is intended for use in missions (for guided commands outside of missions use MAV_CMD_DO_REPOSITION)."]
1322    MAV_CMD_NAV_WAYPOINT = 16,
1323    #[doc = "Loiter around this waypoint an unlimited amount of time"]
1324    MAV_CMD_NAV_LOITER_UNLIM = 17,
1325    #[doc = "Loiter around this waypoint for X turns"]
1326    MAV_CMD_NAV_LOITER_TURNS = 18,
1327    #[doc = "Loiter at the specified latitude, longitude and altitude for a certain amount of time. Multicopter vehicles stop at the point (within a vehicle-specific acceptance radius). Forward-only moving vehicles (e.g. fixed-wing) circle the point with the specified radius/direction. If the Heading Required parameter (2) is non-zero forward moving aircraft will only leave the loiter circle once heading towards the next waypoint."]
1328    MAV_CMD_NAV_LOITER_TIME = 19,
1329    #[doc = "Return to launch location"]
1330    MAV_CMD_NAV_RETURN_TO_LAUNCH = 20,
1331    #[doc = "Land at location."]
1332    MAV_CMD_NAV_LAND = 21,
1333    #[doc = "Takeoff from ground / hand. Vehicles that support multiple takeoff modes (e.g. VTOL quadplane) should take off using the currently configured mode."]
1334    MAV_CMD_NAV_TAKEOFF = 22,
1335    #[doc = "Land at local position (local frame only)"]
1336    MAV_CMD_NAV_LAND_LOCAL = 23,
1337    #[doc = "Takeoff from local position (local frame only)"]
1338    MAV_CMD_NAV_TAKEOFF_LOCAL = 24,
1339    #[doc = "Vehicle following, i.e. this waypoint represents the position of a moving vehicle"]
1340    MAV_CMD_NAV_FOLLOW = 25,
1341    #[doc = "Continue on the current course and climb/descend to specified altitude.  When the altitude is reached continue to the next command (i.e., don't proceed to the next command until the desired altitude is reached."]
1342    MAV_CMD_NAV_CONTINUE_AND_CHANGE_ALT = 30,
1343    #[doc = "Begin loiter at the specified Latitude and Longitude.  If Lat=Lon=0, then loiter at the current position.  Don't consider the navigation command complete (don't leave loiter) until the altitude has been reached. Additionally, if the Heading Required parameter is non-zero the aircraft will not leave the loiter until heading toward the next waypoint."]
1344    MAV_CMD_NAV_LOITER_TO_ALT = 31,
1345    #[doc = "Begin following a target"]
1346    MAV_CMD_DO_FOLLOW = 32,
1347    #[doc = "Reposition the MAV after a follow target command has been sent"]
1348    MAV_CMD_DO_FOLLOW_REPOSITION = 33,
1349    #[doc = "Start orbiting on the circumference of a circle defined by the parameters. Setting values to NaN/INT32_MAX (as appropriate) results in using defaults."]
1350    MAV_CMD_DO_ORBIT = 34,
1351    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1352    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1353    MAV_CMD_NAV_ROI = 80,
1354    #[doc = "Control autonomous path planning on the MAV."]
1355    MAV_CMD_NAV_PATHPLANNING = 81,
1356    #[doc = "Navigate to waypoint using a spline path."]
1357    MAV_CMD_NAV_SPLINE_WAYPOINT = 82,
1358    #[doc = "Takeoff from ground using VTOL mode, and transition to forward flight with specified heading. The command should be ignored by vehicles that dont support both VTOL and fixed-wing flight (multicopters, boats,etc.)."]
1359    MAV_CMD_NAV_VTOL_TAKEOFF = 84,
1360    #[doc = "Land using VTOL mode"]
1361    MAV_CMD_NAV_VTOL_LAND = 85,
1362    #[doc = "hand control over to an external controller"]
1363    MAV_CMD_NAV_GUIDED_ENABLE = 92,
1364    #[doc = "Delay the next navigation command a number of seconds or until a specified time"]
1365    MAV_CMD_NAV_DELAY = 93,
1366    #[doc = "Descend and place payload. Vehicle moves to specified location, descends until it detects a hanging payload has reached the ground, and then releases the payload. If ground is not detected before the reaching the maximum descent value (param1), the command will complete without releasing the payload."]
1367    MAV_CMD_NAV_PAYLOAD_PLACE = 94,
1368    #[doc = "NOP - This command is only used to mark the upper limit of the NAV/ACTION commands in the enumeration"]
1369    MAV_CMD_NAV_LAST = 95,
1370    #[doc = "Delay mission state machine."]
1371    MAV_CMD_CONDITION_DELAY = 112,
1372    #[doc = "Ascend/descend to target altitude at specified rate. Delay mission state machine until desired altitude reached."]
1373    MAV_CMD_CONDITION_CHANGE_ALT = 113,
1374    #[doc = "Delay mission state machine until within desired distance of next NAV point."]
1375    MAV_CMD_CONDITION_DISTANCE = 114,
1376    #[doc = "Reach a certain target angle."]
1377    MAV_CMD_CONDITION_YAW = 115,
1378    #[doc = "NOP - This command is only used to mark the upper limit of the CONDITION commands in the enumeration"]
1379    MAV_CMD_CONDITION_LAST = 159,
1380    #[doc = "Set system mode."]
1381    MAV_CMD_DO_SET_MODE = 176,
1382    #[doc = "Jump to the desired command in the mission list.  Repeat this action only the specified number of times"]
1383    MAV_CMD_DO_JUMP = 177,
1384    #[doc = "Change speed and/or throttle set points. The value persists until it is overridden or there is a mode change"]
1385    MAV_CMD_DO_CHANGE_SPEED = 178,
1386    #[doc = "Sets the home position to either to the current position or a specified position.           The home position is the default position that the system will return to and land on.           The position is set automatically by the system during the takeoff (and may also be set using this command).           Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
1387    MAV_CMD_DO_SET_HOME = 179,
1388    #[deprecated = " See `PARAM_SET` (Deprecated since 2024-04)"]
1389    #[doc = "Set a system parameter.  Caution!  Use of this command requires knowledge of the numeric enumeration value of the parameter."]
1390    MAV_CMD_DO_SET_PARAMETER = 180,
1391    #[doc = "Set a relay to a condition."]
1392    MAV_CMD_DO_SET_RELAY = 181,
1393    #[doc = "Cycle a relay on and off for a desired number of cycles with a desired period."]
1394    MAV_CMD_DO_REPEAT_RELAY = 182,
1395    #[doc = "Set a servo to a desired PWM value."]
1396    MAV_CMD_DO_SET_SERVO = 183,
1397    #[doc = "Cycle a between its nominal setting and a desired PWM for a desired number of cycles with a desired period."]
1398    MAV_CMD_DO_REPEAT_SERVO = 184,
1399    #[doc = "0.5); the ACK should be either MAV_RESULT_FAILED or MAV_RESULT_UNSUPPORTED."]
1400    MAV_CMD_DO_FLIGHTTERMINATION = 185,
1401    #[doc = "Change altitude set point."]
1402    MAV_CMD_DO_CHANGE_ALTITUDE = 186,
1403    #[doc = "Sets actuators (e.g. servos) to a desired value. The actuator numbers are mapped to specific outputs (e.g. on any MAIN or AUX PWM or UAVCAN) using a flight-stack specific mechanism (i.e. a parameter)."]
1404    MAV_CMD_DO_SET_ACTUATOR = 187,
1405    #[doc = "Mission item to specify the start of a failsafe/landing return-path segment (the end of the segment is the next MAV_CMD_DO_LAND_START item).           A vehicle that is using missions for landing (e.g. in a return mode) will join the mission on the closest path of the return-path segment (instead of MAV_CMD_DO_LAND_START or the nearest waypoint).           The main use case is to minimize the failsafe flight path in corridor missions, where the inbound/outbound paths are constrained (by geofences) to the same particular path.           The MAV_CMD_NAV_RETURN_PATH_START would be placed at the start of the return path.           If a failsafe occurs on the outbound path the vehicle will move to the nearest point on the return path (which is parallel for this kind of mission), effectively turning round and following the shortest path to landing.           If a failsafe occurs on the inbound path the vehicle is already on the return segment and will continue to landing.           The Latitude/Longitude/Altitude are optional, and may be set to 0 if not needed.           If specified, the item defines the waypoint at which the return segment starts.           If sent using as a command, the vehicle will perform a mission landing (using the land segment if defined) or reject the command if mission landings are not supported, or no mission landing is defined. When used as a command any position information in the command is ignored."]
1406    MAV_CMD_DO_RETURN_PATH_START = 188,
1407    #[doc = "Mission item to mark the start of a mission landing pattern, or a command to land with a mission landing pattern.          When used in a mission, this is a marker for the start of a sequence of mission items that represent a landing pattern.         It should be followed by a navigation item that defines the first waypoint of the landing sequence.         The start marker positional params are used only for selecting what landing pattern to use if several are defined in the mission (the selected pattern will be the one with the marker position that is closest to the vehicle when a landing is commanded).         If the marker item position has zero-values for latitude, longitude, and altitude, then landing pattern selection is instead based on the position of the first waypoint in the landing sequence.  \t      When sent as a command it triggers a landing using a mission landing pattern. \t      The location parameters are not used in this case, and should be set to 0."]
1408    MAV_CMD_DO_LAND_START = 189,
1409    #[doc = "Mission command to perform a landing from a rally point."]
1410    MAV_CMD_DO_RALLY_LAND = 190,
1411    #[doc = "Mission command to safely abort an autonomous landing."]
1412    MAV_CMD_DO_GO_AROUND = 191,
1413    #[doc = "Reposition the vehicle to a specific WGS84 global position. This command is intended for guided commands (for missions use MAV_CMD_NAV_WAYPOINT instead)."]
1414    MAV_CMD_DO_REPOSITION = 192,
1415    #[doc = "If in a GPS controlled position mode, hold the current position or continue."]
1416    MAV_CMD_DO_PAUSE_CONTINUE = 193,
1417    #[doc = "Set moving direction to forward or reverse."]
1418    MAV_CMD_DO_SET_REVERSE = 194,
1419    #[doc = "Sets the region of interest (ROI) to a location. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal is not to react to this message."]
1420    MAV_CMD_DO_SET_ROI_LOCATION = 195,
1421    #[doc = "Sets the region of interest (ROI) to be toward next waypoint, with optional pitch/roll/yaw offset. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1422    MAV_CMD_DO_SET_ROI_WPNEXT_OFFSET = 196,
1423    #[doc = "Cancels any previous ROI command returning the vehicle/sensors to default flight characteristics. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. After this command the gimbal manager should go back to manual input if available, and otherwise assume a neutral position."]
1424    MAV_CMD_DO_SET_ROI_NONE = 197,
1425    #[doc = "Mount tracks system with specified system ID. Determination of target vehicle position may be done with GLOBAL_POSITION_INT or any other means. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1426    MAV_CMD_DO_SET_ROI_SYSID = 198,
1427    #[doc = "Control onboard camera system."]
1428    MAV_CMD_DO_CONTROL_VIDEO = 200,
1429    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1430    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1431    MAV_CMD_DO_SET_ROI = 201,
1432    #[doc = "Configure digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1433    MAV_CMD_DO_DIGICAM_CONFIGURE = 202,
1434    #[doc = "Control digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1435    MAV_CMD_DO_DIGICAM_CONTROL = 203,
1436    #[deprecated = "This message has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE` (Deprecated since 2020-01)"]
1437    #[doc = "Mission command to configure a camera or antenna mount"]
1438    MAV_CMD_DO_MOUNT_CONFIGURE = 204,
1439    #[deprecated = "This message is ambiguous and inconsistent. It has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW and `MAV_CMD_DO_SET_ROI_*` variants. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1440    #[doc = "Mission command to control a camera or antenna mount"]
1441    MAV_CMD_DO_MOUNT_CONTROL = 205,
1442    #[doc = "Mission command to set camera trigger distance for this flight. The camera is triggered each time this distance is exceeded. This command can also be used to set the shutter integration time for the camera."]
1443    MAV_CMD_DO_SET_CAM_TRIGG_DIST = 206,
1444    #[doc = "Enable the geofence.           This can be used in a mission or via the command protocol.           The persistence/lifetime of the setting is undefined.           Depending on flight stack implementation it may persist until superseded, or it may revert to a system default at the end of a mission.           Flight stacks typically reset the setting to system defaults on reboot."]
1445    MAV_CMD_DO_FENCE_ENABLE = 207,
1446    #[doc = "Mission item/command to release a parachute or enable/disable auto release."]
1447    MAV_CMD_DO_PARACHUTE = 208,
1448    #[doc = "Command to perform motor test."]
1449    MAV_CMD_DO_MOTOR_TEST = 209,
1450    #[doc = "Change to/from inverted flight."]
1451    MAV_CMD_DO_INVERTED_FLIGHT = 210,
1452    #[doc = "Mission command to operate a gripper."]
1453    MAV_CMD_DO_GRIPPER = 211,
1454    #[doc = "Enable/disable autotune."]
1455    MAV_CMD_DO_AUTOTUNE_ENABLE = 212,
1456    #[doc = "Sets a desired vehicle turn angle and speed change."]
1457    MAV_CMD_NAV_SET_YAW_SPEED = 213,
1458    #[doc = "Mission command to set camera trigger interval for this flight. If triggering is enabled, the camera is triggered each time this interval expires. This command can also be used to set the shutter integration time for the camera."]
1459    MAV_CMD_DO_SET_CAM_TRIGG_INTERVAL = 214,
1460    #[deprecated = " See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1461    #[doc = "Mission command to control a camera or antenna mount, using a quaternion as reference."]
1462    MAV_CMD_DO_MOUNT_CONTROL_QUAT = 220,
1463    #[doc = "set id of master controller"]
1464    MAV_CMD_DO_GUIDED_MASTER = 221,
1465    #[doc = "Set limits for external control"]
1466    MAV_CMD_DO_GUIDED_LIMITS = 222,
1467    #[doc = "Control vehicle engine. This is interpreted by the vehicles engine controller to change the target engine state. It is intended for vehicles with internal combustion engines"]
1468    MAV_CMD_DO_ENGINE_CONTROL = 223,
1469    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).           If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items. \t  Note that mission jump repeat counters are not reset unless param2 is set (see MAV_CMD_DO_JUMP param2).            This command may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.           If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.           If the system is not in mission mode this command must not trigger a switch to mission mode.            The mission may be \"reset\" using param2.           Resetting sets jump counters to initial values (to reset counters without changing the current mission item set the param1 to `-1`).           Resetting also explicitly changes a mission state of MISSION_STATE_COMPLETE to MISSION_STATE_PAUSED or MISSION_STATE_ACTIVE, potentially allowing it to resume when it is (next) in a mission mode.  \t  The command will ACK with MAV_RESULT_FAILED if the sequence number is out of range (including if there is no mission item)."]
1470    MAV_CMD_DO_SET_MISSION_CURRENT = 224,
1471    #[doc = "NOP - This command is only used to mark the upper limit of the DO commands in the enumeration"]
1472    MAV_CMD_DO_LAST = 240,
1473    #[doc = "Trigger calibration. This command will be only accepted if in pre-flight mode. Except for Temperature Calibration, only one sensor should be set in a single message and all others should be zero."]
1474    MAV_CMD_PREFLIGHT_CALIBRATION = 241,
1475    #[doc = "Set sensor offsets. This command will be only accepted if in pre-flight mode."]
1476    MAV_CMD_PREFLIGHT_SET_SENSOR_OFFSETS = 242,
1477    #[doc = "Trigger UAVCAN configuration (actuator ID assignment and direction mapping). Note that this maps to the legacy UAVCAN v0 function UAVCAN_ENUMERATE, which is intended to be executed just once during initial vehicle configuration (it is not a normal pre-flight command and has been poorly named)."]
1478    MAV_CMD_PREFLIGHT_UAVCAN = 243,
1479    #[doc = "Request storage of different parameter values and logs. This command will be only accepted if in pre-flight mode."]
1480    MAV_CMD_PREFLIGHT_STORAGE = 245,
1481    #[doc = "Request the reboot or shutdown of system components."]
1482    MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN = 246,
1483    #[doc = "Override current mission with command to pause mission, pause mission and move to position, continue/resume mission. When param 1 indicates that the mission is paused (MAV_GOTO_DO_HOLD), param 2 defines whether it holds in place or moves to another position."]
1484    MAV_CMD_OVERRIDE_GOTO = 252,
1485    #[doc = "Mission command to set a Camera Auto Mount Pivoting Oblique Survey (Replaces CAM_TRIGG_DIST for this purpose). The camera is triggered each time this distance is exceeded, then the mount moves to the next position. Params 4~6 set-up the angle limits and number of positions for oblique survey, where mount-enabled vehicles automatically roll the camera between shots to emulate an oblique camera setup (providing an increased HFOV). This command can also be used to set the shutter integration time for the camera."]
1486    MAV_CMD_OBLIQUE_SURVEY = 260,
1487    #[doc = "Enable the specified standard MAVLink mode.           If the specified mode is not supported, the vehicle should ACK with MAV_RESULT_FAILED.           See <https://mavlink.io/en/services/standard_modes.html>"]
1488    MAV_CMD_DO_SET_STANDARD_MODE = 262,
1489    #[doc = "start running a mission"]
1490    MAV_CMD_MISSION_START = 300,
1491    #[doc = "Actuator testing command. This is similar to MAV_CMD_DO_MOTOR_TEST but operates on the level of output functions, i.e. it is possible to test Motor1 independent from which output it is configured on. Autopilots must NACK this command with MAV_RESULT_TEMPORARILY_REJECTED while armed."]
1492    MAV_CMD_ACTUATOR_TEST = 310,
1493    #[doc = "Actuator configuration command."]
1494    MAV_CMD_CONFIGURE_ACTUATOR = 311,
1495    #[doc = "Arms / Disarms a component"]
1496    MAV_CMD_COMPONENT_ARM_DISARM = 400,
1497    #[doc = "Instructs a target system to run pre-arm checks.           This allows preflight checks to be run on demand, which may be useful on systems that normally run them at low rate, or which do not trigger checks when the armable state might have changed.           This command should return MAV_RESULT_ACCEPTED if it will run the checks.           The results of the checks are usually then reported in SYS_STATUS messages (this is system-specific).           The command should return MAV_RESULT_TEMPORARILY_REJECTED if the system is already armed."]
1498    MAV_CMD_RUN_PREARM_CHECKS = 401,
1499    #[doc = "Turns illuminators ON/OFF. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1500    MAV_CMD_ILLUMINATOR_ON_OFF = 405,
1501    #[doc = "Configures illuminator settings. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1502    MAV_CMD_DO_ILLUMINATOR_CONFIGURE = 406,
1503    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1504    #[doc = "Request the home position from the vehicle. \t  The vehicle will ACK the command and then emit the HOME_POSITION message."]
1505    MAV_CMD_GET_HOME_POSITION = 410,
1506    #[doc = "Inject artificial failure for testing purposes. Note that autopilots should implement an additional protection before accepting this command such as a specific param setting."]
1507    MAV_CMD_INJECT_FAILURE = 420,
1508    #[doc = "Starts receiver pairing."]
1509    MAV_CMD_START_RX_PAIR = 500,
1510    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1511    #[doc = "Request the interval between messages for a particular MAVLink message ID.           The receiver should ACK the command and then emit its response in a MESSAGE_INTERVAL message."]
1512    MAV_CMD_GET_MESSAGE_INTERVAL = 510,
1513    #[doc = "Set the interval between messages for a particular MAVLink message ID. This interface replaces REQUEST_DATA_STREAM."]
1514    MAV_CMD_SET_MESSAGE_INTERVAL = 511,
1515    #[doc = "Request the target system(s) emit a single instance of a specified message (i.e. a \"one-shot\" version of MAV_CMD_SET_MESSAGE_INTERVAL)."]
1516    MAV_CMD_REQUEST_MESSAGE = 512,
1517    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1518    #[doc = "Request MAVLink protocol version compatibility. All receivers should ACK the command and then emit their capabilities in an PROTOCOL_VERSION message"]
1519    MAV_CMD_REQUEST_PROTOCOL_VERSION = 519,
1520    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1521    #[doc = "Request autopilot capabilities. The receiver should ACK the command and then emit its capabilities in an AUTOPILOT_VERSION message"]
1522    MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES = 520,
1523    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1524    #[doc = "Request camera information (CAMERA_INFORMATION)."]
1525    MAV_CMD_REQUEST_CAMERA_INFORMATION = 521,
1526    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1527    #[doc = "Request camera settings (CAMERA_SETTINGS)."]
1528    MAV_CMD_REQUEST_CAMERA_SETTINGS = 522,
1529    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1530    #[doc = "Request storage information (STORAGE_INFORMATION). Use the command's target_component to target a specific component's storage."]
1531    MAV_CMD_REQUEST_STORAGE_INFORMATION = 525,
1532    #[doc = "Format a storage medium. Once format is complete, a STORAGE_INFORMATION message is sent. Use the command's target_component to target a specific component's storage."]
1533    MAV_CMD_STORAGE_FORMAT = 526,
1534    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1535    #[doc = "Request camera capture status (CAMERA_CAPTURE_STATUS)"]
1536    MAV_CMD_REQUEST_CAMERA_CAPTURE_STATUS = 527,
1537    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1538    #[doc = "Request flight information (FLIGHT_INFORMATION)"]
1539    MAV_CMD_REQUEST_FLIGHT_INFORMATION = 528,
1540    #[doc = "Reset all camera settings to Factory Default"]
1541    MAV_CMD_RESET_CAMERA_SETTINGS = 529,
1542    #[doc = "Set camera running mode. Use NaN for reserved values. GCS will send a MAV_CMD_REQUEST_VIDEO_STREAM_STATUS command after a mode change if the camera supports video streaming."]
1543    MAV_CMD_SET_CAMERA_MODE = 530,
1544    #[doc = "Set camera zoom. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1545    MAV_CMD_SET_CAMERA_ZOOM = 531,
1546    #[doc = "Set camera focus. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1547    MAV_CMD_SET_CAMERA_FOCUS = 532,
1548    #[doc = "Set that a particular storage is the preferred location for saving photos, videos, and/or other media (e.g. to set that an SD card is used for storing videos).           There can only be one preferred save location for each particular media type: setting a media usage flag will clear/reset that same flag if set on any other storage.           If no flag is set the system should use its default storage.           A target system can choose to always use default storage, in which case it should ACK the command with MAV_RESULT_UNSUPPORTED.           A target system can choose to not allow a particular storage to be set as preferred storage, in which case it should ACK the command with MAV_RESULT_DENIED."]
1549    MAV_CMD_SET_STORAGE_USAGE = 533,
1550    #[doc = "Set camera source. Changes the camera's active sources on cameras with multiple image sensors."]
1551    MAV_CMD_SET_CAMERA_SOURCE = 534,
1552    #[doc = "Tagged jump target. Can be jumped to with MAV_CMD_DO_JUMP_TAG."]
1553    MAV_CMD_JUMP_TAG = 600,
1554    #[doc = "Jump to the matching tag in the mission list. Repeat this action for the specified number of times. A mission should contain a single matching tag for each jump. If this is not the case then a jump to a missing tag should complete the mission, and a jump where there are multiple matching tags should always select the one with the lowest mission sequence number."]
1555    MAV_CMD_DO_JUMP_TAG = 601,
1556    #[doc = "Set gimbal manager pitch/yaw setpoints (low rate command). It is possible to set combinations of the values below. E.g. an angle as well as a desired angular rate can be used to get to this angle at a certain angular rate, or an angular rate only will result in continuous turning. NaN is to be used to signal unset. Note: only the gimbal manager will react to this command - it will be ignored by a gimbal device. Use GIMBAL_MANAGER_SET_PITCHYAW if you need to stream pitch/yaw setpoints at higher rate."]
1557    MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW = 1000,
1558    #[doc = "Gimbal configuration to set which sysid/compid is in primary and secondary control."]
1559    MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE = 1001,
1560    #[doc = "Start image capture sequence. CAMERA_IMAGE_CAPTURED must be emitted after each capture.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param 1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1561    MAV_CMD_IMAGE_START_CAPTURE = 2000,
1562    #[doc = "Stop image capture sequence.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1563    MAV_CMD_IMAGE_STOP_CAPTURE = 2001,
1564    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1565    #[doc = "Re-request a CAMERA_IMAGE_CAPTURED message."]
1566    MAV_CMD_REQUEST_CAMERA_IMAGE_CAPTURE = 2002,
1567    #[doc = "Enable or disable on-board camera triggering system."]
1568    MAV_CMD_DO_TRIGGER_CONTROL = 2003,
1569    #[doc = "If the camera supports point visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_POINT is set), this command allows to initiate the tracking."]
1570    MAV_CMD_CAMERA_TRACK_POINT = 2004,
1571    #[doc = "If the camera supports rectangle visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE is set), this command allows to initiate the tracking."]
1572    MAV_CMD_CAMERA_TRACK_RECTANGLE = 2005,
1573    #[doc = "Stops ongoing tracking."]
1574    MAV_CMD_CAMERA_STOP_TRACKING = 2010,
1575    #[doc = "Starts video capture (recording)."]
1576    MAV_CMD_VIDEO_START_CAPTURE = 2500,
1577    #[doc = "Stop the current video capture (recording)."]
1578    MAV_CMD_VIDEO_STOP_CAPTURE = 2501,
1579    #[doc = "Start video streaming"]
1580    MAV_CMD_VIDEO_START_STREAMING = 2502,
1581    #[doc = "Stop the given video stream"]
1582    MAV_CMD_VIDEO_STOP_STREAMING = 2503,
1583    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1584    #[doc = "Request video stream information (VIDEO_STREAM_INFORMATION)"]
1585    MAV_CMD_REQUEST_VIDEO_STREAM_INFORMATION = 2504,
1586    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1587    #[doc = "Request video stream status (VIDEO_STREAM_STATUS)"]
1588    MAV_CMD_REQUEST_VIDEO_STREAM_STATUS = 2505,
1589    #[doc = "Request to start streaming logging data over MAVLink (see also LOGGING_DATA message)"]
1590    MAV_CMD_LOGGING_START = 2510,
1591    #[doc = "Request to stop streaming log data over MAVLink"]
1592    MAV_CMD_LOGGING_STOP = 2511,
1593    MAV_CMD_AIRFRAME_CONFIGURATION = 2520,
1594    #[doc = "Request to start/stop transmitting over the high latency telemetry"]
1595    MAV_CMD_CONTROL_HIGH_LATENCY = 2600,
1596    #[doc = "Create a panorama at the current position"]
1597    MAV_CMD_PANORAMA_CREATE = 2800,
1598    #[doc = "Request VTOL transition"]
1599    MAV_CMD_DO_VTOL_TRANSITION = 3000,
1600    #[doc = "Request authorization to arm the vehicle to a external entity, the arm authorizer is responsible to request all data that is needs from the vehicle before authorize or deny the request. \t\tIf approved the COMMAND_ACK message progress field should be set with period of time that this authorization is valid in seconds. \t\tIf the authorization is denied COMMAND_ACK.result_param2 should be set with one of the reasons in ARM_AUTH_DENIED_REASON."]
1601    MAV_CMD_ARM_AUTHORIZATION_REQUEST = 3001,
1602    #[doc = "This command sets the submode to standard guided when vehicle is in guided mode. The vehicle holds position and altitude and the user can input the desired velocities along all three axes."]
1603    MAV_CMD_SET_GUIDED_SUBMODE_STANDARD = 4000,
1604    #[doc = "This command sets submode circle when vehicle is in guided mode. Vehicle flies along a circle facing the center of the circle. The user can input the velocity along the circle and change the radius. If no input is given the vehicle will hold position."]
1605    MAV_CMD_SET_GUIDED_SUBMODE_CIRCLE = 4001,
1606    #[doc = "Delay mission state machine until gate has been reached."]
1607    MAV_CMD_CONDITION_GATE = 4501,
1608    #[doc = "Fence return point (there can only be one such point in a geofence definition). If rally points are supported they should be used instead."]
1609    MAV_CMD_NAV_FENCE_RETURN_POINT = 5000,
1610    #[doc = "Fence vertex for an inclusion polygon (the polygon must not be self-intersecting). The vehicle must stay within this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1611    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_INCLUSION = 5001,
1612    #[doc = "Fence vertex for an exclusion polygon (the polygon must not be self-intersecting). The vehicle must stay outside this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1613    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_EXCLUSION = 5002,
1614    #[doc = "Circular fence area. The vehicle must stay inside this area."]
1615    MAV_CMD_NAV_FENCE_CIRCLE_INCLUSION = 5003,
1616    #[doc = "Circular fence area. The vehicle must stay outside this area."]
1617    MAV_CMD_NAV_FENCE_CIRCLE_EXCLUSION = 5004,
1618    #[doc = "Rally point. You can have multiple rally points defined."]
1619    MAV_CMD_NAV_RALLY_POINT = 5100,
1620    #[doc = "Commands the vehicle to respond with a sequence of messages UAVCAN_NODE_INFO, one message per every UAVCAN node that is online. Note that some of the response messages can be lost, which the receiver can detect easily by checking whether every received UAVCAN_NODE_STATUS has a matching message UAVCAN_NODE_INFO received earlier; if not, this command should be sent again in order to request re-transmission of the node information messages."]
1621    MAV_CMD_UAVCAN_GET_NODE_INFO = 5200,
1622    #[doc = "Change state of safety switch."]
1623    MAV_CMD_DO_SET_SAFETY_SWITCH_STATE = 5300,
1624    #[doc = "Trigger the start of an ADSB-out IDENT. This should only be used when requested to do so by an Air Traffic Controller in controlled airspace. This starts the IDENT which is then typically held for 18 seconds by the hardware per the Mode A, C, and S transponder spec."]
1625    MAV_CMD_DO_ADSB_OUT_IDENT = 10001,
1626    #[deprecated = "  (Deprecated since 2021-06)"]
1627    #[doc = "Deploy payload on a Lat / Lon / Alt position. This includes the navigation to reach the required release position and velocity."]
1628    MAV_CMD_PAYLOAD_PREPARE_DEPLOY = 30001,
1629    #[deprecated = "  (Deprecated since 2021-06)"]
1630    #[doc = "Control the payload deployment."]
1631    MAV_CMD_PAYLOAD_CONTROL_DEPLOY = 30002,
1632    #[doc = "Magnetometer calibration based on provided known yaw. This allows for fast calibration using WMM field tables in the vehicle, given only the known yaw of the vehicle. If Latitude and longitude are both zero then use the current vehicle location."]
1633    MAV_CMD_FIXED_MAG_CAL_YAW = 42006,
1634    #[doc = "Command to operate winch."]
1635    MAV_CMD_DO_WINCH = 42600,
1636    #[doc = "Provide an external position estimate for use when dead-reckoning. This is meant to be used for occasional position resets that may be provided by a external system such as a remote pilot using landmarks over a video link."]
1637    MAV_CMD_EXTERNAL_POSITION_ESTIMATE = 43003,
1638    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1639    MAV_CMD_WAYPOINT_USER_1 = 31000,
1640    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1641    MAV_CMD_WAYPOINT_USER_2 = 31001,
1642    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1643    MAV_CMD_WAYPOINT_USER_3 = 31002,
1644    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1645    MAV_CMD_WAYPOINT_USER_4 = 31003,
1646    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1647    MAV_CMD_WAYPOINT_USER_5 = 31004,
1648    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1649    MAV_CMD_SPATIAL_USER_1 = 31005,
1650    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1651    MAV_CMD_SPATIAL_USER_2 = 31006,
1652    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1653    MAV_CMD_SPATIAL_USER_3 = 31007,
1654    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1655    MAV_CMD_SPATIAL_USER_4 = 31008,
1656    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1657    MAV_CMD_SPATIAL_USER_5 = 31009,
1658    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1659    MAV_CMD_USER_1 = 31010,
1660    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1661    MAV_CMD_USER_2 = 31011,
1662    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1663    MAV_CMD_USER_3 = 31012,
1664    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1665    MAV_CMD_USER_4 = 31013,
1666    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1667    MAV_CMD_USER_5 = 31014,
1668    #[doc = "Request forwarding of CAN packets from the given CAN bus to this component. CAN Frames are sent using CAN_FRAME and CANFD_FRAME messages"]
1669    MAV_CMD_CAN_FORWARD = 32000,
1670}
1671impl MavCmd {
1672    pub const DEFAULT: Self = Self::MAV_CMD_NAV_WAYPOINT;
1673}
1674impl Default for MavCmd {
1675    fn default() -> Self {
1676        Self::DEFAULT
1677    }
1678}
1679#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1680#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1681#[cfg_attr(feature = "serde", serde(tag = "type"))]
1682#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1683#[repr(u32)]
1684#[doc = "Possible actions an aircraft can take to avoid a collision."]
1685pub enum MavCollisionAction {
1686    #[doc = "Ignore any potential collisions"]
1687    MAV_COLLISION_ACTION_NONE = 0,
1688    #[doc = "Report potential collision"]
1689    MAV_COLLISION_ACTION_REPORT = 1,
1690    #[doc = "Ascend or Descend to avoid threat"]
1691    MAV_COLLISION_ACTION_ASCEND_OR_DESCEND = 2,
1692    #[doc = "Move horizontally to avoid threat"]
1693    MAV_COLLISION_ACTION_MOVE_HORIZONTALLY = 3,
1694    #[doc = "Aircraft to move perpendicular to the collision's velocity vector"]
1695    MAV_COLLISION_ACTION_MOVE_PERPENDICULAR = 4,
1696    #[doc = "Aircraft to fly directly back to its launch point"]
1697    MAV_COLLISION_ACTION_RTL = 5,
1698    #[doc = "Aircraft to stop in place"]
1699    MAV_COLLISION_ACTION_HOVER = 6,
1700}
1701impl MavCollisionAction {
1702    pub const DEFAULT: Self = Self::MAV_COLLISION_ACTION_NONE;
1703}
1704impl Default for MavCollisionAction {
1705    fn default() -> Self {
1706        Self::DEFAULT
1707    }
1708}
1709#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1710#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1711#[cfg_attr(feature = "serde", serde(tag = "type"))]
1712#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1713#[repr(u32)]
1714#[doc = "Source of information about this collision."]
1715pub enum MavCollisionSrc {
1716    #[doc = "ID field references ADSB_VEHICLE packets"]
1717    MAV_COLLISION_SRC_ADSB = 0,
1718    #[doc = "ID field references MAVLink SRC ID"]
1719    MAV_COLLISION_SRC_MAVLINK_GPS_GLOBAL_INT = 1,
1720}
1721impl MavCollisionSrc {
1722    pub const DEFAULT: Self = Self::MAV_COLLISION_SRC_ADSB;
1723}
1724impl Default for MavCollisionSrc {
1725    fn default() -> Self {
1726        Self::DEFAULT
1727    }
1728}
1729#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1730#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1731#[cfg_attr(feature = "serde", serde(tag = "type"))]
1732#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1733#[repr(u32)]
1734#[doc = "Aircraft-rated danger from this threat."]
1735pub enum MavCollisionThreatLevel {
1736    #[doc = "Not a threat"]
1737    MAV_COLLISION_THREAT_LEVEL_NONE = 0,
1738    #[doc = "Craft is mildly concerned about this threat"]
1739    MAV_COLLISION_THREAT_LEVEL_LOW = 1,
1740    #[doc = "Craft is panicking, and may take actions to avoid threat"]
1741    MAV_COLLISION_THREAT_LEVEL_HIGH = 2,
1742}
1743impl MavCollisionThreatLevel {
1744    pub const DEFAULT: Self = Self::MAV_COLLISION_THREAT_LEVEL_NONE;
1745}
1746impl Default for MavCollisionThreatLevel {
1747    fn default() -> Self {
1748        Self::DEFAULT
1749    }
1750}
1751#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1752#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1753#[cfg_attr(feature = "serde", serde(tag = "type"))]
1754#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1755#[repr(u32)]
1756#[doc = "Component ids (values) for the different types and instances of onboard hardware/software that might make up a MAVLink system (autopilot, cameras, servos, GPS systems, avoidance systems etc.).       Components must use the appropriate ID in their source address when sending messages. Components can also use IDs to determine if they are the intended recipient of an incoming message. The MAV_COMP_ID_ALL value is used to indicate messages that must be processed by all components.       When creating new entries, components that can have multiple instances (e.g. cameras, servos etc.) should be allocated sequential values. An appropriate number of values should be left free after these components to allow the number of instances to be expanded."]
1757pub enum MavComponent {
1758    #[doc = "Target id (target_component) used to broadcast messages to all components of the receiving system. Components should attempt to process messages with this component ID and forward to components on any other interfaces. Note: This is not a valid *source* component id for a message."]
1759    MAV_COMP_ID_ALL = 0,
1760    #[doc = "System flight controller component (\"autopilot\"). Only one autopilot is expected in a particular system."]
1761    MAV_COMP_ID_AUTOPILOT1 = 1,
1762    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1763    MAV_COMP_ID_USER1 = 25,
1764    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1765    MAV_COMP_ID_USER2 = 26,
1766    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1767    MAV_COMP_ID_USER3 = 27,
1768    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1769    MAV_COMP_ID_USER4 = 28,
1770    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1771    MAV_COMP_ID_USER5 = 29,
1772    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1773    MAV_COMP_ID_USER6 = 30,
1774    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1775    MAV_COMP_ID_USER7 = 31,
1776    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1777    MAV_COMP_ID_USER8 = 32,
1778    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1779    MAV_COMP_ID_USER9 = 33,
1780    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1781    MAV_COMP_ID_USER10 = 34,
1782    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1783    MAV_COMP_ID_USER11 = 35,
1784    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1785    MAV_COMP_ID_USER12 = 36,
1786    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1787    MAV_COMP_ID_USER13 = 37,
1788    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1789    MAV_COMP_ID_USER14 = 38,
1790    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1791    MAV_COMP_ID_USER15 = 39,
1792    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1793    MAV_COMP_ID_USER16 = 40,
1794    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1795    MAV_COMP_ID_USER17 = 41,
1796    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1797    MAV_COMP_ID_USER18 = 42,
1798    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1799    MAV_COMP_ID_USER19 = 43,
1800    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1801    MAV_COMP_ID_USER20 = 44,
1802    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1803    MAV_COMP_ID_USER21 = 45,
1804    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1805    MAV_COMP_ID_USER22 = 46,
1806    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1807    MAV_COMP_ID_USER23 = 47,
1808    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1809    MAV_COMP_ID_USER24 = 48,
1810    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1811    MAV_COMP_ID_USER25 = 49,
1812    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1813    MAV_COMP_ID_USER26 = 50,
1814    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1815    MAV_COMP_ID_USER27 = 51,
1816    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1817    MAV_COMP_ID_USER28 = 52,
1818    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1819    MAV_COMP_ID_USER29 = 53,
1820    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1821    MAV_COMP_ID_USER30 = 54,
1822    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1823    MAV_COMP_ID_USER31 = 55,
1824    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1825    MAV_COMP_ID_USER32 = 56,
1826    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1827    MAV_COMP_ID_USER33 = 57,
1828    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1829    MAV_COMP_ID_USER34 = 58,
1830    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1831    MAV_COMP_ID_USER35 = 59,
1832    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1833    MAV_COMP_ID_USER36 = 60,
1834    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1835    MAV_COMP_ID_USER37 = 61,
1836    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1837    MAV_COMP_ID_USER38 = 62,
1838    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1839    MAV_COMP_ID_USER39 = 63,
1840    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1841    MAV_COMP_ID_USER40 = 64,
1842    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1843    MAV_COMP_ID_USER41 = 65,
1844    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1845    MAV_COMP_ID_USER42 = 66,
1846    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1847    MAV_COMP_ID_USER43 = 67,
1848    #[doc = "Telemetry radio (e.g. SiK radio, or other component that emits RADIO_STATUS messages)."]
1849    MAV_COMP_ID_TELEMETRY_RADIO = 68,
1850    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1851    MAV_COMP_ID_USER45 = 69,
1852    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1853    MAV_COMP_ID_USER46 = 70,
1854    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1855    MAV_COMP_ID_USER47 = 71,
1856    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1857    MAV_COMP_ID_USER48 = 72,
1858    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1859    MAV_COMP_ID_USER49 = 73,
1860    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1861    MAV_COMP_ID_USER50 = 74,
1862    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1863    MAV_COMP_ID_USER51 = 75,
1864    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1865    MAV_COMP_ID_USER52 = 76,
1866    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1867    MAV_COMP_ID_USER53 = 77,
1868    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1869    MAV_COMP_ID_USER54 = 78,
1870    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1871    MAV_COMP_ID_USER55 = 79,
1872    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1873    MAV_COMP_ID_USER56 = 80,
1874    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1875    MAV_COMP_ID_USER57 = 81,
1876    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1877    MAV_COMP_ID_USER58 = 82,
1878    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1879    MAV_COMP_ID_USER59 = 83,
1880    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1881    MAV_COMP_ID_USER60 = 84,
1882    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1883    MAV_COMP_ID_USER61 = 85,
1884    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1885    MAV_COMP_ID_USER62 = 86,
1886    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1887    MAV_COMP_ID_USER63 = 87,
1888    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1889    MAV_COMP_ID_USER64 = 88,
1890    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1891    MAV_COMP_ID_USER65 = 89,
1892    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1893    MAV_COMP_ID_USER66 = 90,
1894    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1895    MAV_COMP_ID_USER67 = 91,
1896    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1897    MAV_COMP_ID_USER68 = 92,
1898    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1899    MAV_COMP_ID_USER69 = 93,
1900    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1901    MAV_COMP_ID_USER70 = 94,
1902    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1903    MAV_COMP_ID_USER71 = 95,
1904    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1905    MAV_COMP_ID_USER72 = 96,
1906    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1907    MAV_COMP_ID_USER73 = 97,
1908    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1909    MAV_COMP_ID_USER74 = 98,
1910    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1911    MAV_COMP_ID_USER75 = 99,
1912    #[doc = "Camera #1."]
1913    MAV_COMP_ID_CAMERA = 100,
1914    #[doc = "Camera #2."]
1915    MAV_COMP_ID_CAMERA2 = 101,
1916    #[doc = "Camera #3."]
1917    MAV_COMP_ID_CAMERA3 = 102,
1918    #[doc = "Camera #4."]
1919    MAV_COMP_ID_CAMERA4 = 103,
1920    #[doc = "Camera #5."]
1921    MAV_COMP_ID_CAMERA5 = 104,
1922    #[doc = "Camera #6."]
1923    MAV_COMP_ID_CAMERA6 = 105,
1924    #[doc = "Servo #1."]
1925    MAV_COMP_ID_SERVO1 = 140,
1926    #[doc = "Servo #2."]
1927    MAV_COMP_ID_SERVO2 = 141,
1928    #[doc = "Servo #3."]
1929    MAV_COMP_ID_SERVO3 = 142,
1930    #[doc = "Servo #4."]
1931    MAV_COMP_ID_SERVO4 = 143,
1932    #[doc = "Servo #5."]
1933    MAV_COMP_ID_SERVO5 = 144,
1934    #[doc = "Servo #6."]
1935    MAV_COMP_ID_SERVO6 = 145,
1936    #[doc = "Servo #7."]
1937    MAV_COMP_ID_SERVO7 = 146,
1938    #[doc = "Servo #8."]
1939    MAV_COMP_ID_SERVO8 = 147,
1940    #[doc = "Servo #9."]
1941    MAV_COMP_ID_SERVO9 = 148,
1942    #[doc = "Servo #10."]
1943    MAV_COMP_ID_SERVO10 = 149,
1944    #[doc = "Servo #11."]
1945    MAV_COMP_ID_SERVO11 = 150,
1946    #[doc = "Servo #12."]
1947    MAV_COMP_ID_SERVO12 = 151,
1948    #[doc = "Servo #13."]
1949    MAV_COMP_ID_SERVO13 = 152,
1950    #[doc = "Servo #14."]
1951    MAV_COMP_ID_SERVO14 = 153,
1952    #[doc = "Gimbal #1."]
1953    MAV_COMP_ID_GIMBAL = 154,
1954    #[doc = "Logging component."]
1955    MAV_COMP_ID_LOG = 155,
1956    #[doc = "Automatic Dependent Surveillance-Broadcast (ADS-B) component."]
1957    MAV_COMP_ID_ADSB = 156,
1958    #[doc = "On Screen Display (OSD) devices for video links."]
1959    MAV_COMP_ID_OSD = 157,
1960    #[doc = "Generic autopilot peripheral component ID. Meant for devices that do not implement the parameter microservice."]
1961    MAV_COMP_ID_PERIPHERAL = 158,
1962    #[deprecated = "All gimbals should use MAV_COMP_ID_GIMBAL. See `MAV_COMP_ID_GIMBAL` (Deprecated since 2018-11)"]
1963    #[doc = "Gimbal ID for QX1."]
1964    MAV_COMP_ID_QX1_GIMBAL = 159,
1965    #[doc = "FLARM collision alert component."]
1966    MAV_COMP_ID_FLARM = 160,
1967    #[doc = "Parachute component."]
1968    MAV_COMP_ID_PARACHUTE = 161,
1969    #[doc = "Winch component."]
1970    MAV_COMP_ID_WINCH = 169,
1971    #[doc = "Gimbal #2."]
1972    MAV_COMP_ID_GIMBAL2 = 171,
1973    #[doc = "Gimbal #3."]
1974    MAV_COMP_ID_GIMBAL3 = 172,
1975    #[doc = "Gimbal #4"]
1976    MAV_COMP_ID_GIMBAL4 = 173,
1977    #[doc = "Gimbal #5."]
1978    MAV_COMP_ID_GIMBAL5 = 174,
1979    #[doc = "Gimbal #6."]
1980    MAV_COMP_ID_GIMBAL6 = 175,
1981    #[doc = "Battery #1."]
1982    MAV_COMP_ID_BATTERY = 180,
1983    #[doc = "Battery #2."]
1984    MAV_COMP_ID_BATTERY2 = 181,
1985    #[doc = "CAN over MAVLink client."]
1986    MAV_COMP_ID_MAVCAN = 189,
1987    #[doc = "Component that can generate/supply a mission flight plan (e.g. GCS or developer API)."]
1988    MAV_COMP_ID_MISSIONPLANNER = 190,
1989    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
1990    MAV_COMP_ID_ONBOARD_COMPUTER = 191,
1991    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
1992    MAV_COMP_ID_ONBOARD_COMPUTER2 = 192,
1993    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
1994    MAV_COMP_ID_ONBOARD_COMPUTER3 = 193,
1995    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
1996    MAV_COMP_ID_ONBOARD_COMPUTER4 = 194,
1997    #[doc = "Component that finds an optimal path between points based on a certain constraint (e.g. minimum snap, shortest path, cost, etc.)."]
1998    MAV_COMP_ID_PATHPLANNER = 195,
1999    #[doc = "Component that plans a collision free path between two points."]
2000    MAV_COMP_ID_OBSTACLE_AVOIDANCE = 196,
2001    #[doc = "Component that provides position estimates using VIO techniques."]
2002    MAV_COMP_ID_VISUAL_INERTIAL_ODOMETRY = 197,
2003    #[doc = "Component that manages pairing of vehicle and GCS."]
2004    MAV_COMP_ID_PAIRING_MANAGER = 198,
2005    #[doc = "Inertial Measurement Unit (IMU) #1."]
2006    MAV_COMP_ID_IMU = 200,
2007    #[doc = "Inertial Measurement Unit (IMU) #2."]
2008    MAV_COMP_ID_IMU_2 = 201,
2009    #[doc = "Inertial Measurement Unit (IMU) #3."]
2010    MAV_COMP_ID_IMU_3 = 202,
2011    #[doc = "GPS #1."]
2012    MAV_COMP_ID_GPS = 220,
2013    #[doc = "GPS #2."]
2014    MAV_COMP_ID_GPS2 = 221,
2015    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2016    MAV_COMP_ID_ODID_TXRX_1 = 236,
2017    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2018    MAV_COMP_ID_ODID_TXRX_2 = 237,
2019    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2020    MAV_COMP_ID_ODID_TXRX_3 = 238,
2021    #[doc = "Component to bridge MAVLink to UDP (i.e. from a UART)."]
2022    MAV_COMP_ID_UDP_BRIDGE = 240,
2023    #[doc = "Component to bridge to UART (i.e. from UDP)."]
2024    MAV_COMP_ID_UART_BRIDGE = 241,
2025    #[doc = "Component handling TUNNEL messages (e.g. vendor specific GUI of a component)."]
2026    MAV_COMP_ID_TUNNEL_NODE = 242,
2027    #[doc = "Illuminator"]
2028    MAV_COMP_ID_ILLUMINATOR = 243,
2029    #[deprecated = "System control does not require a separate component ID. Instead, system commands should be sent with target_component=MAV_COMP_ID_ALL allowing the target component to use any appropriate component id. See `MAV_COMP_ID_ALL` (Deprecated since 2018-11)"]
2030    #[doc = "Deprecated, don't use. Component for handling system messages (e.g. to ARM, takeoff, etc.)."]
2031    MAV_COMP_ID_SYSTEM_CONTROL = 250,
2032}
2033impl MavComponent {
2034    pub const DEFAULT: Self = Self::MAV_COMP_ID_ALL;
2035}
2036impl Default for MavComponent {
2037    fn default() -> Self {
2038        Self::DEFAULT
2039    }
2040}
2041#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2042#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2043#[cfg_attr(feature = "serde", serde(tag = "type"))]
2044#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2045#[repr(u32)]
2046#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-06)"]
2047#[doc = "A data stream is not a fixed set of messages, but rather a      recommendation to the autopilot software. Individual autopilots may or may not obey      the recommended messages."]
2048pub enum MavDataStream {
2049    #[doc = "Enable all data streams"]
2050    MAV_DATA_STREAM_ALL = 0,
2051    #[doc = "Enable IMU_RAW, GPS_RAW, GPS_STATUS packets."]
2052    MAV_DATA_STREAM_RAW_SENSORS = 1,
2053    #[doc = "Enable GPS_STATUS, CONTROL_STATUS, AUX_STATUS"]
2054    MAV_DATA_STREAM_EXTENDED_STATUS = 2,
2055    #[doc = "Enable RC_CHANNELS_SCALED, RC_CHANNELS_RAW, SERVO_OUTPUT_RAW"]
2056    MAV_DATA_STREAM_RC_CHANNELS = 3,
2057    #[doc = "Enable ATTITUDE_CONTROLLER_OUTPUT, POSITION_CONTROLLER_OUTPUT, NAV_CONTROLLER_OUTPUT."]
2058    MAV_DATA_STREAM_RAW_CONTROLLER = 4,
2059    #[doc = "Enable LOCAL_POSITION, GLOBAL_POSITION_INT messages."]
2060    MAV_DATA_STREAM_POSITION = 6,
2061    #[doc = "Dependent on the autopilot"]
2062    MAV_DATA_STREAM_EXTRA1 = 10,
2063    #[doc = "Dependent on the autopilot"]
2064    MAV_DATA_STREAM_EXTRA2 = 11,
2065    #[doc = "Dependent on the autopilot"]
2066    MAV_DATA_STREAM_EXTRA3 = 12,
2067}
2068impl MavDataStream {
2069    pub const DEFAULT: Self = Self::MAV_DATA_STREAM_ALL;
2070}
2071impl Default for MavDataStream {
2072    fn default() -> Self {
2073        Self::DEFAULT
2074    }
2075}
2076#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2077#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2078#[cfg_attr(feature = "serde", serde(tag = "type"))]
2079#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2080#[repr(u32)]
2081#[doc = "Enumeration of distance sensor types"]
2082pub enum MavDistanceSensor {
2083    #[doc = "Laser rangefinder, e.g. LightWare SF02/F or PulsedLight units"]
2084    MAV_DISTANCE_SENSOR_LASER = 0,
2085    #[doc = "Ultrasound rangefinder, e.g. MaxBotix units"]
2086    MAV_DISTANCE_SENSOR_ULTRASOUND = 1,
2087    #[doc = "Infrared rangefinder, e.g. Sharp units"]
2088    MAV_DISTANCE_SENSOR_INFRARED = 2,
2089    #[doc = "Radar type, e.g. uLanding units"]
2090    MAV_DISTANCE_SENSOR_RADAR = 3,
2091    #[doc = "Broken or unknown type, e.g. analog units"]
2092    MAV_DISTANCE_SENSOR_UNKNOWN = 4,
2093}
2094impl MavDistanceSensor {
2095    pub const DEFAULT: Self = Self::MAV_DISTANCE_SENSOR_LASER;
2096}
2097impl Default for MavDistanceSensor {
2098    fn default() -> Self {
2099        Self::DEFAULT
2100    }
2101}
2102#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2103#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2104#[cfg_attr(feature = "serde", serde(tag = "type"))]
2105#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2106#[repr(u32)]
2107#[doc = "Bitmap of options for the MAV_CMD_DO_REPOSITION"]
2108pub enum MavDoRepositionFlags {
2109    #[doc = "The aircraft should immediately transition into guided. This should not be set for follow me applications"]
2110    MAV_DO_REPOSITION_FLAGS_CHANGE_MODE = 1,
2111}
2112impl MavDoRepositionFlags {
2113    pub const DEFAULT: Self = Self::MAV_DO_REPOSITION_FLAGS_CHANGE_MODE;
2114}
2115impl Default for MavDoRepositionFlags {
2116    fn default() -> Self {
2117        Self::DEFAULT
2118    }
2119}
2120#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2121#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2122#[cfg_attr(feature = "serde", serde(tag = "type"))]
2123#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2124#[repr(u32)]
2125#[doc = "Enumeration of estimator types"]
2126pub enum MavEstimatorType {
2127    #[doc = "Unknown type of the estimator."]
2128    MAV_ESTIMATOR_TYPE_UNKNOWN = 0,
2129    #[doc = "This is a naive estimator without any real covariance feedback."]
2130    MAV_ESTIMATOR_TYPE_NAIVE = 1,
2131    #[doc = "Computer vision based estimate. Might be up to scale."]
2132    MAV_ESTIMATOR_TYPE_VISION = 2,
2133    #[doc = "Visual-inertial estimate."]
2134    MAV_ESTIMATOR_TYPE_VIO = 3,
2135    #[doc = "Plain GPS estimate."]
2136    MAV_ESTIMATOR_TYPE_GPS = 4,
2137    #[doc = "Estimator integrating GPS and inertial sensing."]
2138    MAV_ESTIMATOR_TYPE_GPS_INS = 5,
2139    #[doc = "Estimate from external motion capturing system."]
2140    MAV_ESTIMATOR_TYPE_MOCAP = 6,
2141    #[doc = "Estimator based on lidar sensor input."]
2142    MAV_ESTIMATOR_TYPE_LIDAR = 7,
2143    #[doc = "Estimator on autopilot."]
2144    MAV_ESTIMATOR_TYPE_AUTOPILOT = 8,
2145}
2146impl MavEstimatorType {
2147    pub const DEFAULT: Self = Self::MAV_ESTIMATOR_TYPE_UNKNOWN;
2148}
2149impl Default for MavEstimatorType {
2150    fn default() -> Self {
2151        Self::DEFAULT
2152    }
2153}
2154#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2155#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2156#[cfg_attr(feature = "serde", serde(tag = "type"))]
2157#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2158#[repr(u32)]
2159#[doc = "Flags for CURRENT_EVENT_SEQUENCE."]
2160pub enum MavEventCurrentSequenceFlags {
2161    #[doc = "A sequence reset has happened (e.g. vehicle reboot)."]
2162    MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET = 1,
2163}
2164impl MavEventCurrentSequenceFlags {
2165    pub const DEFAULT: Self = Self::MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET;
2166}
2167impl Default for MavEventCurrentSequenceFlags {
2168    fn default() -> Self {
2169        Self::DEFAULT
2170    }
2171}
2172#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2173#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2174#[cfg_attr(feature = "serde", serde(tag = "type"))]
2175#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2176#[repr(u32)]
2177#[doc = "Reason for an event error response."]
2178pub enum MavEventErrorReason {
2179    #[doc = "The requested event is not available (anymore)."]
2180    MAV_EVENT_ERROR_REASON_UNAVAILABLE = 0,
2181}
2182impl MavEventErrorReason {
2183    pub const DEFAULT: Self = Self::MAV_EVENT_ERROR_REASON_UNAVAILABLE;
2184}
2185impl Default for MavEventErrorReason {
2186    fn default() -> Self {
2187        Self::DEFAULT
2188    }
2189}
2190#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2191#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2192#[cfg_attr(feature = "serde", serde(tag = "type"))]
2193#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2194#[repr(u32)]
2195#[doc = "Coordinate frames used by MAVLink. Not all frames are supported by all commands, messages, or vehicles.        Global frames use the following naming conventions:       - \"GLOBAL\": Global coordinate frame with WGS84 latitude/longitude and altitude positive over mean sea level (MSL) by default.         The following modifiers may be used with \"GLOBAL\":         - \"RELATIVE_ALT\": Altitude is relative to the vehicle home position rather than MSL.         - \"TERRAIN_ALT\": Altitude is relative to ground level rather than MSL.         - \"INT\": Latitude/longitude (in degrees) are scaled by multiplying by 1E7.        Local frames use the following naming conventions:       - \"LOCAL\": Origin of local frame is fixed relative to earth. Unless otherwise specified this origin is the origin of the vehicle position-estimator (\"EKF\").       - \"BODY\": Origin of local frame travels with the vehicle. NOTE, \"BODY\" does NOT indicate alignment of frame axis with vehicle attitude.       - \"OFFSET\": Deprecated synonym for \"BODY\" (origin travels with the vehicle). Not to be used for new frames.        Some deprecated frames do not follow these conventions (e.g. MAV_FRAME_BODY_NED and MAV_FRAME_BODY_OFFSET_NED)."]
2196pub enum MavFrame {
2197    #[doc = "Global (WGS84) coordinate frame + altitude relative to mean sea level (MSL)."]
2198    MAV_FRAME_GLOBAL = 0,
2199    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin fixed relative to earth."]
2200    MAV_FRAME_LOCAL_NED = 1,
2201    #[doc = "NOT a coordinate frame, indicates a mission command."]
2202    MAV_FRAME_MISSION = 2,
2203    #[doc = "Global (WGS84) coordinate frame + altitude relative to the home position."]
2204    MAV_FRAME_GLOBAL_RELATIVE_ALT = 3,
2205    #[doc = "ENU local tangent frame (x: East, y: North, z: Up) with origin fixed relative to earth."]
2206    MAV_FRAME_LOCAL_ENU = 4,
2207    #[deprecated = "Use MAV_FRAME_GLOBAL in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL` (Deprecated since 2024-03)"]
2208    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to mean sea level (MSL)."]
2209    MAV_FRAME_GLOBAL_INT = 5,
2210    #[deprecated = "Use MAV_FRAME_GLOBAL_RELATIVE_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_RELATIVE_ALT` (Deprecated since 2024-03)"]
2211    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to the home position."]
2212    MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6,
2213    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin that travels with the vehicle."]
2214    MAV_FRAME_LOCAL_OFFSET_NED = 7,
2215    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2216    #[doc = "Same as MAV_FRAME_LOCAL_NED when used to represent position values. Same as MAV_FRAME_BODY_FRD when used with velocity/acceleration values."]
2217    MAV_FRAME_BODY_NED = 8,
2218    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2219    #[doc = "This is the same as MAV_FRAME_BODY_FRD."]
2220    MAV_FRAME_BODY_OFFSET_NED = 9,
2221    #[doc = "Global (WGS84) coordinate frame with AGL altitude (altitude at ground level)."]
2222    MAV_FRAME_GLOBAL_TERRAIN_ALT = 10,
2223    #[deprecated = "Use MAV_FRAME_GLOBAL_TERRAIN_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_TERRAIN_ALT` (Deprecated since 2024-03)"]
2224    #[doc = "Global (WGS84) coordinate frame (scaled) with AGL altitude (altitude at ground level)."]
2225    MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11,
2226    #[doc = "FRD local frame aligned to the vehicle's attitude (x: Forward, y: Right, z: Down) with an origin that travels with vehicle."]
2227    MAV_FRAME_BODY_FRD = 12,
2228    #[deprecated = "  (Deprecated since 2019-04)"]
2229    #[doc = "MAV_FRAME_BODY_FLU - Body fixed frame of reference, Z-up (x: Forward, y: Left, z: Up)."]
2230    MAV_FRAME_RESERVED_13 = 13,
2231    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2232    #[doc = "MAV_FRAME_MOCAP_NED - Odometry local coordinate frame of data given by a motion capture system, Z-down (x: North, y: East, z: Down)."]
2233    MAV_FRAME_RESERVED_14 = 14,
2234    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2235    #[doc = "MAV_FRAME_MOCAP_ENU - Odometry local coordinate frame of data given by a motion capture system, Z-up (x: East, y: North, z: Up)."]
2236    MAV_FRAME_RESERVED_15 = 15,
2237    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2238    #[doc = "MAV_FRAME_VISION_NED - Odometry local coordinate frame of data given by a vision estimation system, Z-down (x: North, y: East, z: Down)."]
2239    MAV_FRAME_RESERVED_16 = 16,
2240    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2241    #[doc = "MAV_FRAME_VISION_ENU - Odometry local coordinate frame of data given by a vision estimation system, Z-up (x: East, y: North, z: Up)."]
2242    MAV_FRAME_RESERVED_17 = 17,
2243    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2244    #[doc = "MAV_FRAME_ESTIM_NED - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-down (x: North, y: East, z: Down)."]
2245    MAV_FRAME_RESERVED_18 = 18,
2246    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2247    #[doc = "MAV_FRAME_ESTIM_ENU - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-up (x: East, y: North, z: Up)."]
2248    MAV_FRAME_RESERVED_19 = 19,
2249    #[doc = "FRD local tangent frame (x: Forward, y: Right, z: Down) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2250    MAV_FRAME_LOCAL_FRD = 20,
2251    #[doc = "FLU local tangent frame (x: Forward, y: Left, z: Up) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2252    MAV_FRAME_LOCAL_FLU = 21,
2253}
2254impl MavFrame {
2255    pub const DEFAULT: Self = Self::MAV_FRAME_GLOBAL;
2256}
2257impl Default for MavFrame {
2258    fn default() -> Self {
2259        Self::DEFAULT
2260    }
2261}
2262#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2263#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2264#[cfg_attr(feature = "serde", serde(tag = "type"))]
2265#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2266#[repr(u32)]
2267#[doc = "MAV FTP error codes (<https://mavlink.io/en/services/ftp.html>)"]
2268pub enum MavFtpErr {
2269    #[doc = "None: No error"]
2270    MAV_FTP_ERR_NONE = 0,
2271    #[doc = "Fail: Unknown failure"]
2272    MAV_FTP_ERR_FAIL = 1,
2273    #[doc = "FailErrno: Command failed, Err number sent back in PayloadHeader.data[1]. \t\tThis is a file-system error number understood by the server operating system."]
2274    MAV_FTP_ERR_FAILERRNO = 2,
2275    #[doc = "InvalidDataSize: Payload size is invalid"]
2276    MAV_FTP_ERR_INVALIDDATASIZE = 3,
2277    #[doc = "InvalidSession: Session is not currently open"]
2278    MAV_FTP_ERR_INVALIDSESSION = 4,
2279    #[doc = "NoSessionsAvailable: All available sessions are already in use"]
2280    MAV_FTP_ERR_NOSESSIONSAVAILABLE = 5,
2281    #[doc = "EOF: Offset past end of file for ListDirectory and ReadFile commands"]
2282    MAV_FTP_ERR_EOF = 6,
2283    #[doc = "UnknownCommand: Unknown command / opcode"]
2284    MAV_FTP_ERR_UNKNOWNCOMMAND = 7,
2285    #[doc = "FileExists: File/directory already exists"]
2286    MAV_FTP_ERR_FILEEXISTS = 8,
2287    #[doc = "FileProtected: File/directory is write protected"]
2288    MAV_FTP_ERR_FILEPROTECTED = 9,
2289    #[doc = "FileNotFound: File/directory not found"]
2290    MAV_FTP_ERR_FILENOTFOUND = 10,
2291}
2292impl MavFtpErr {
2293    pub const DEFAULT: Self = Self::MAV_FTP_ERR_NONE;
2294}
2295impl Default for MavFtpErr {
2296    fn default() -> Self {
2297        Self::DEFAULT
2298    }
2299}
2300#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2301#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2302#[cfg_attr(feature = "serde", serde(tag = "type"))]
2303#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2304#[repr(u32)]
2305#[doc = "MAV FTP opcodes: <https://mavlink.io/en/services/ftp.html>"]
2306pub enum MavFtpOpcode {
2307    #[doc = "None. Ignored, always ACKed"]
2308    MAV_FTP_OPCODE_NONE = 0,
2309    #[doc = "TerminateSession: Terminates open Read session"]
2310    MAV_FTP_OPCODE_TERMINATESESSION = 1,
2311    #[doc = "ResetSessions: Terminates all open read sessions"]
2312    MAV_FTP_OPCODE_RESETSESSION = 2,
2313    #[doc = "ListDirectory. List files and directories in path from offset"]
2314    MAV_FTP_OPCODE_LISTDIRECTORY = 3,
2315    #[doc = "OpenFileRO: Opens file at path for reading, returns session"]
2316    MAV_FTP_OPCODE_OPENFILERO = 4,
2317    #[doc = "ReadFile: Reads size bytes from offset in session"]
2318    MAV_FTP_OPCODE_READFILE = 5,
2319    #[doc = "CreateFile: Creates file at path for writing, returns session"]
2320    MAV_FTP_OPCODE_CREATEFILE = 6,
2321    #[doc = "WriteFile: Writes size bytes to offset in session"]
2322    MAV_FTP_OPCODE_WRITEFILE = 7,
2323    #[doc = "RemoveFile: Remove file at path"]
2324    MAV_FTP_OPCODE_REMOVEFILE = 8,
2325    #[doc = "CreateDirectory: Creates directory at path"]
2326    MAV_FTP_OPCODE_CREATEDIRECTORY = 9,
2327    #[doc = "RemoveDirectory: Removes directory at path. The directory must be empty."]
2328    MAV_FTP_OPCODE_REMOVEDIRECTORY = 10,
2329    #[doc = "OpenFileWO: Opens file at path for writing, returns session"]
2330    MAV_FTP_OPCODE_OPENFILEWO = 11,
2331    #[doc = "TruncateFile: Truncate file at path to offset length"]
2332    MAV_FTP_OPCODE_TRUNCATEFILE = 12,
2333    #[doc = "Rename: Rename path1 to path2"]
2334    MAV_FTP_OPCODE_RENAME = 13,
2335    #[doc = "CalcFileCRC32: Calculate CRC32 for file at path"]
2336    MAV_FTP_OPCODE_CALCFILECRC = 14,
2337    #[doc = "BurstReadFile: Burst download session file"]
2338    MAV_FTP_OPCODE_BURSTREADFILE = 15,
2339    #[doc = "ACK: ACK response"]
2340    MAV_FTP_OPCODE_ACK = 128,
2341    #[doc = "NAK: NAK response"]
2342    MAV_FTP_OPCODE_NAK = 129,
2343}
2344impl MavFtpOpcode {
2345    pub const DEFAULT: Self = Self::MAV_FTP_OPCODE_NONE;
2346}
2347impl Default for MavFtpOpcode {
2348    fn default() -> Self {
2349        Self::DEFAULT
2350    }
2351}
2352#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2353#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2354#[cfg_attr(feature = "serde", serde(tag = "type"))]
2355#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2356#[repr(u32)]
2357#[doc = "Fuel types for use in FUEL_TYPE. Fuel types specify the units for the maximum, available and consumed fuel, and for the flow rates."]
2358pub enum MavFuelType {
2359    #[doc = "Not specified. Fuel levels are normalized (i.e. maximum is 1, and other levels are relative to 1)."]
2360    MAV_FUEL_TYPE_UNKNOWN = 0,
2361    #[doc = "A generic liquid fuel. Fuel levels are in millilitres (ml). Fuel rates are in millilitres/second."]
2362    MAV_FUEL_TYPE_LIQUID = 1,
2363    #[doc = "A gas tank. Fuel levels are in kilo-Pascal (kPa), and flow rates are in milliliters per second (ml/s)."]
2364    MAV_FUEL_TYPE_GAS = 2,
2365}
2366impl MavFuelType {
2367    pub const DEFAULT: Self = Self::MAV_FUEL_TYPE_UNKNOWN;
2368}
2369impl Default for MavFuelType {
2370    fn default() -> Self {
2371        Self::DEFAULT
2372    }
2373}
2374bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report status/failure cases for a power generator (used in GENERATOR_STATUS). Note that FAULTS are conditions that cause the generator to fail. Warnings are conditions that require attention before the next use (they indicate the system is not operating properly)."] pub struct MavGeneratorStatusFlag : u64 { # [doc = "Generator is off."] const MAV_GENERATOR_STATUS_FLAG_OFF = 1 ; # [doc = "Generator is ready to start generating power."] const MAV_GENERATOR_STATUS_FLAG_READY = 2 ; # [doc = "Generator is generating power."] const MAV_GENERATOR_STATUS_FLAG_GENERATING = 4 ; # [doc = "Generator is charging the batteries (generating enough power to charge and provide the load)."] const MAV_GENERATOR_STATUS_FLAG_CHARGING = 8 ; # [doc = "Generator is operating at a reduced maximum power."] const MAV_GENERATOR_STATUS_FLAG_REDUCED_POWER = 16 ; # [doc = "Generator is providing the maximum output."] const MAV_GENERATOR_STATUS_FLAG_MAXPOWER = 32 ; # [doc = "Generator is near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_WARNING = 64 ; # [doc = "Generator hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_FAULT = 128 ; # [doc = "Power electronics are near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_WARNING = 256 ; # [doc = "Power electronics hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_FAULT = 512 ; # [doc = "Power electronics experienced a fault and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_FAULT = 1024 ; # [doc = "The power source supplying the generator failed e.g. mechanical generator stopped, tether is no longer providing power, solar cell is in shade, hydrogen reaction no longer happening."] const MAV_GENERATOR_STATUS_FLAG_POWERSOURCE_FAULT = 2048 ; # [doc = "Generator controller having communication problems."] const MAV_GENERATOR_STATUS_FLAG_COMMUNICATION_WARNING = 4096 ; # [doc = "Power electronic or generator cooling system error."] const MAV_GENERATOR_STATUS_FLAG_COOLING_WARNING = 8192 ; # [doc = "Generator controller power rail experienced a fault."] const MAV_GENERATOR_STATUS_FLAG_POWER_RAIL_FAULT = 16384 ; # [doc = "Generator controller exceeded the overcurrent threshold and shutdown to prevent damage."] const MAV_GENERATOR_STATUS_FLAG_OVERCURRENT_FAULT = 32768 ; # [doc = "Generator controller detected a high current going into the batteries and shutdown to prevent battery damage."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_OVERCHARGE_CURRENT_FAULT = 65536 ; # [doc = "Generator controller exceeded it's overvoltage threshold and shutdown to prevent it exceeding the voltage rating."] const MAV_GENERATOR_STATUS_FLAG_OVERVOLTAGE_FAULT = 131072 ; # [doc = "Batteries are under voltage (generator will not start)."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_UNDERVOLT_FAULT = 262144 ; # [doc = "Generator start is inhibited by e.g. a safety switch."] const MAV_GENERATOR_STATUS_FLAG_START_INHIBITED = 524288 ; # [doc = "Generator requires maintenance."] const MAV_GENERATOR_STATUS_FLAG_MAINTENANCE_REQUIRED = 1048576 ; # [doc = "Generator is not ready to generate yet."] const MAV_GENERATOR_STATUS_FLAG_WARMING_UP = 2097152 ; # [doc = "Generator is idle."] const MAV_GENERATOR_STATUS_FLAG_IDLE = 4194304 ; } }
2375impl MavGeneratorStatusFlag {
2376    pub const DEFAULT: Self = Self::MAV_GENERATOR_STATUS_FLAG_OFF;
2377}
2378impl Default for MavGeneratorStatusFlag {
2379    fn default() -> Self {
2380        Self::DEFAULT
2381    }
2382}
2383#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2384#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2385#[cfg_attr(feature = "serde", serde(tag = "type"))]
2386#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2387#[repr(u32)]
2388#[doc = "Actions that may be specified in MAV_CMD_OVERRIDE_GOTO to override mission execution."]
2389pub enum MavGoto {
2390    #[doc = "Hold at the current position."]
2391    MAV_GOTO_DO_HOLD = 0,
2392    #[doc = "Continue with the next item in mission execution."]
2393    MAV_GOTO_DO_CONTINUE = 1,
2394    #[doc = "Hold at the current position of the system"]
2395    MAV_GOTO_HOLD_AT_CURRENT_POSITION = 2,
2396    #[doc = "Hold at the position specified in the parameters of the DO_HOLD action"]
2397    MAV_GOTO_HOLD_AT_SPECIFIED_POSITION = 3,
2398}
2399impl MavGoto {
2400    pub const DEFAULT: Self = Self::MAV_GOTO_DO_HOLD;
2401}
2402impl Default for MavGoto {
2403    fn default() -> Self {
2404        Self::DEFAULT
2405    }
2406}
2407#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2408#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2409#[cfg_attr(feature = "serde", serde(tag = "type"))]
2410#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2411#[repr(u32)]
2412#[doc = "Enumeration of landed detector states"]
2413pub enum MavLandedState {
2414    #[doc = "MAV landed state is unknown"]
2415    MAV_LANDED_STATE_UNDEFINED = 0,
2416    #[doc = "MAV is landed (on ground)"]
2417    MAV_LANDED_STATE_ON_GROUND = 1,
2418    #[doc = "MAV is in air"]
2419    MAV_LANDED_STATE_IN_AIR = 2,
2420    #[doc = "MAV currently taking off"]
2421    MAV_LANDED_STATE_TAKEOFF = 3,
2422    #[doc = "MAV currently landing"]
2423    MAV_LANDED_STATE_LANDING = 4,
2424}
2425impl MavLandedState {
2426    pub const DEFAULT: Self = Self::MAV_LANDED_STATE_UNDEFINED;
2427}
2428impl Default for MavLandedState {
2429    fn default() -> Self {
2430        Self::DEFAULT
2431    }
2432}
2433#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2434#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2435#[cfg_attr(feature = "serde", serde(tag = "type"))]
2436#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2437#[repr(u32)]
2438#[doc = "Result of mission operation (in a MISSION_ACK message)."]
2439pub enum MavMissionResult {
2440    #[doc = "mission accepted OK"]
2441    MAV_MISSION_ACCEPTED = 0,
2442    #[doc = "Generic error / not accepting mission commands at all right now."]
2443    MAV_MISSION_ERROR = 1,
2444    #[doc = "Coordinate frame is not supported."]
2445    MAV_MISSION_UNSUPPORTED_FRAME = 2,
2446    #[doc = "Command is not supported."]
2447    MAV_MISSION_UNSUPPORTED = 3,
2448    #[doc = "Mission items exceed storage space."]
2449    MAV_MISSION_NO_SPACE = 4,
2450    #[doc = "One of the parameters has an invalid value."]
2451    MAV_MISSION_INVALID = 5,
2452    #[doc = "param1 has an invalid value."]
2453    MAV_MISSION_INVALID_PARAM1 = 6,
2454    #[doc = "param2 has an invalid value."]
2455    MAV_MISSION_INVALID_PARAM2 = 7,
2456    #[doc = "param3 has an invalid value."]
2457    MAV_MISSION_INVALID_PARAM3 = 8,
2458    #[doc = "param4 has an invalid value."]
2459    MAV_MISSION_INVALID_PARAM4 = 9,
2460    #[doc = "x / param5 has an invalid value."]
2461    MAV_MISSION_INVALID_PARAM5_X = 10,
2462    #[doc = "y / param6 has an invalid value."]
2463    MAV_MISSION_INVALID_PARAM6_Y = 11,
2464    #[doc = "z / param7 has an invalid value."]
2465    MAV_MISSION_INVALID_PARAM7 = 12,
2466    #[doc = "Mission item received out of sequence"]
2467    MAV_MISSION_INVALID_SEQUENCE = 13,
2468    #[doc = "Not accepting any mission commands from this communication partner."]
2469    MAV_MISSION_DENIED = 14,
2470    #[doc = "Current mission operation cancelled (e.g. mission upload, mission download)."]
2471    MAV_MISSION_OPERATION_CANCELLED = 15,
2472}
2473impl MavMissionResult {
2474    pub const DEFAULT: Self = Self::MAV_MISSION_ACCEPTED;
2475}
2476impl Default for MavMissionResult {
2477    fn default() -> Self {
2478        Self::DEFAULT
2479    }
2480}
2481#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2482#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2483#[cfg_attr(feature = "serde", serde(tag = "type"))]
2484#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2485#[repr(u32)]
2486#[doc = "Type of mission items being requested/sent in mission protocol."]
2487pub enum MavMissionType {
2488    #[doc = "Items are mission commands for main mission."]
2489    MAV_MISSION_TYPE_MISSION = 0,
2490    #[doc = "Specifies GeoFence area(s). Items are MAV_CMD_NAV_FENCE_ GeoFence items."]
2491    MAV_MISSION_TYPE_FENCE = 1,
2492    #[doc = "Specifies the rally points for the vehicle. Rally points are alternative RTL points. Items are MAV_CMD_NAV_RALLY_POINT rally point items."]
2493    MAV_MISSION_TYPE_RALLY = 2,
2494    #[doc = "Only used in MISSION_CLEAR_ALL to clear all mission types."]
2495    MAV_MISSION_TYPE_ALL = 255,
2496}
2497impl MavMissionType {
2498    pub const DEFAULT: Self = Self::MAV_MISSION_TYPE_MISSION;
2499}
2500impl Default for MavMissionType {
2501    fn default() -> Self {
2502        Self::DEFAULT
2503    }
2504}
2505#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2506#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2507#[cfg_attr(feature = "serde", serde(tag = "type"))]
2508#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2509#[repr(u32)]
2510#[doc = "These defines are predefined OR-combined mode flags. There is no need to use values from this enum, but it                simplifies the use of the mode flags. Note that manual input is enabled in all modes as a safety override."]
2511pub enum MavMode {
2512    #[doc = "System is not ready to fly, booting, calibrating, etc. No flag is set."]
2513    MAV_MODE_PREFLIGHT = 0,
2514    #[doc = "System is allowed to be active, under assisted RC control."]
2515    MAV_MODE_STABILIZE_DISARMED = 80,
2516    #[doc = "System is allowed to be active, under assisted RC control."]
2517    MAV_MODE_STABILIZE_ARMED = 208,
2518    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2519    MAV_MODE_MANUAL_DISARMED = 64,
2520    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2521    MAV_MODE_MANUAL_ARMED = 192,
2522    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2523    MAV_MODE_GUIDED_DISARMED = 88,
2524    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2525    MAV_MODE_GUIDED_ARMED = 216,
2526    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2527    MAV_MODE_AUTO_DISARMED = 92,
2528    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2529    MAV_MODE_AUTO_ARMED = 220,
2530    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2531    MAV_MODE_TEST_DISARMED = 66,
2532    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2533    MAV_MODE_TEST_ARMED = 194,
2534}
2535impl MavMode {
2536    pub const DEFAULT: Self = Self::MAV_MODE_PREFLIGHT;
2537}
2538impl Default for MavMode {
2539    fn default() -> Self {
2540        Self::DEFAULT
2541    }
2542}
2543bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags encode the MAV mode."] pub struct MavModeFlag : u8 { # [doc = "0b10000000 MAV safety set to armed. Motors are enabled / running / can start. Ready to fly. Additional note: this flag is to be ignore when sent in the command MAV_CMD_DO_SET_MODE and MAV_CMD_COMPONENT_ARM_DISARM shall be used instead. The flag can still be used to report the armed state."] const MAV_MODE_FLAG_SAFETY_ARMED = 128 ; # [doc = "0b01000000 remote control input is enabled."] const MAV_MODE_FLAG_MANUAL_INPUT_ENABLED = 64 ; # [doc = "0b00100000 hardware in the loop simulation. All motors / actuators are blocked, but internal software is full operational."] const MAV_MODE_FLAG_HIL_ENABLED = 32 ; # [doc = "0b00010000 system stabilizes electronically its attitude (and optionally position). It needs however further control inputs to move around."] const MAV_MODE_FLAG_STABILIZE_ENABLED = 16 ; # [doc = "0b00001000 guided mode enabled, system flies waypoints / mission items."] const MAV_MODE_FLAG_GUIDED_ENABLED = 8 ; # [doc = "0b00000100 autonomous mode enabled, system finds its own goal positions. Guided flag can be set or not, depends on the actual implementation."] const MAV_MODE_FLAG_AUTO_ENABLED = 4 ; # [doc = "0b00000010 system has a test mode enabled. This flag is intended for temporary system tests and should not be used for stable implementations."] const MAV_MODE_FLAG_TEST_ENABLED = 2 ; # [doc = "0b00000001 Reserved for future use."] const MAV_MODE_FLAG_CUSTOM_MODE_ENABLED = 1 ; } }
2544impl MavModeFlag {
2545    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_SAFETY_ARMED;
2546}
2547impl Default for MavModeFlag {
2548    fn default() -> Self {
2549        Self::DEFAULT
2550    }
2551}
2552#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2553#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2554#[cfg_attr(feature = "serde", serde(tag = "type"))]
2555#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2556#[repr(u32)]
2557#[doc = "These values encode the bit positions of the decode position. These values can be used to read the value of a flag bit by combining the base_mode variable with AND with the flag position value. The result will be either 0 or 1, depending on if the flag is set or not."]
2558pub enum MavModeFlagDecodePosition {
2559    #[doc = "First bit:  10000000"]
2560    MAV_MODE_FLAG_DECODE_POSITION_SAFETY = 128,
2561    #[doc = "Second bit: 01000000"]
2562    MAV_MODE_FLAG_DECODE_POSITION_MANUAL = 64,
2563    #[doc = "Third bit:  00100000"]
2564    MAV_MODE_FLAG_DECODE_POSITION_HIL = 32,
2565    #[doc = "Fourth bit: 00010000"]
2566    MAV_MODE_FLAG_DECODE_POSITION_STABILIZE = 16,
2567    #[doc = "Fifth bit:  00001000"]
2568    MAV_MODE_FLAG_DECODE_POSITION_GUIDED = 8,
2569    #[doc = "Sixth bit:   00000100"]
2570    MAV_MODE_FLAG_DECODE_POSITION_AUTO = 4,
2571    #[doc = "Seventh bit: 00000010"]
2572    MAV_MODE_FLAG_DECODE_POSITION_TEST = 2,
2573    #[doc = "Eighth bit: 00000001"]
2574    MAV_MODE_FLAG_DECODE_POSITION_CUSTOM_MODE = 1,
2575}
2576impl MavModeFlagDecodePosition {
2577    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_DECODE_POSITION_SAFETY;
2578}
2579impl Default for MavModeFlagDecodePosition {
2580    fn default() -> Self {
2581        Self::DEFAULT
2582    }
2583}
2584bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Mode properties."] pub struct MavModeProperty : u32 { # [doc = "If set, this mode is an advanced mode.           For example a rate-controlled manual mode might be advanced, whereas a position-controlled manual mode is not.           A GCS can optionally use this flag to configure the UI for its intended users."] const MAV_MODE_PROPERTY_ADVANCED = 1 ; # [doc = "If set, this mode should not be added to the list of selectable modes.           The mode might still be selected by the FC directly (for example as part of a failsafe)."] const MAV_MODE_PROPERTY_NOT_USER_SELECTABLE = 2 ; # [doc = "If set, this mode is automatically controlled (it may use but does not require a manual controller).           If unset the mode is a assumed to require user input (be a manual mode)."] const MAV_MODE_PROPERTY_AUTO_MODE = 4 ; } }
2585impl MavModeProperty {
2586    pub const DEFAULT: Self = Self::MAV_MODE_PROPERTY_ADVANCED;
2587}
2588impl Default for MavModeProperty {
2589    fn default() -> Self {
2590        Self::DEFAULT
2591    }
2592}
2593#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2594#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2595#[cfg_attr(feature = "serde", serde(tag = "type"))]
2596#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2597#[repr(u32)]
2598#[deprecated = " See `GIMBAL_MANAGER_FLAGS` (Deprecated since 2020-01)"]
2599#[doc = "Enumeration of possible mount operation modes. This message is used by obsolete/deprecated gimbal messages."]
2600pub enum MavMountMode {
2601    #[doc = "Load and keep safe position (Roll,Pitch,Yaw) from permanent memory and stop stabilization"]
2602    MAV_MOUNT_MODE_RETRACT = 0,
2603    #[doc = "Load and keep neutral position (Roll,Pitch,Yaw) from permanent memory."]
2604    MAV_MOUNT_MODE_NEUTRAL = 1,
2605    #[doc = "Load neutral position and start MAVLink Roll,Pitch,Yaw control with stabilization"]
2606    MAV_MOUNT_MODE_MAVLINK_TARGETING = 2,
2607    #[doc = "Load neutral position and start RC Roll,Pitch,Yaw control with stabilization"]
2608    MAV_MOUNT_MODE_RC_TARGETING = 3,
2609    #[doc = "Load neutral position and start to point to Lat,Lon,Alt"]
2610    MAV_MOUNT_MODE_GPS_POINT = 4,
2611    #[doc = "Gimbal tracks system with specified system ID"]
2612    MAV_MOUNT_MODE_SYSID_TARGET = 5,
2613    #[doc = "Gimbal tracks home position"]
2614    MAV_MOUNT_MODE_HOME_LOCATION = 6,
2615}
2616impl MavMountMode {
2617    pub const DEFAULT: Self = Self::MAV_MOUNT_MODE_RETRACT;
2618}
2619impl Default for MavMountMode {
2620    fn default() -> Self {
2621        Self::DEFAULT
2622    }
2623}
2624#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2625#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2626#[cfg_attr(feature = "serde", serde(tag = "type"))]
2627#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2628#[repr(u32)]
2629pub enum MavOdidArmStatus {
2630    #[doc = "Passing arming checks."]
2631    MAV_ODID_ARM_STATUS_GOOD_TO_ARM = 0,
2632    #[doc = "Generic arming failure, see error string for details."]
2633    MAV_ODID_ARM_STATUS_PRE_ARM_FAIL_GENERIC = 1,
2634}
2635impl MavOdidArmStatus {
2636    pub const DEFAULT: Self = Self::MAV_ODID_ARM_STATUS_GOOD_TO_ARM;
2637}
2638impl Default for MavOdidArmStatus {
2639    fn default() -> Self {
2640        Self::DEFAULT
2641    }
2642}
2643#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2644#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2645#[cfg_attr(feature = "serde", serde(tag = "type"))]
2646#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2647#[repr(u32)]
2648pub enum MavOdidAuthType {
2649    #[doc = "No authentication type is specified."]
2650    MAV_ODID_AUTH_TYPE_NONE = 0,
2651    #[doc = "Signature for the UAS (Unmanned Aircraft System) ID."]
2652    MAV_ODID_AUTH_TYPE_UAS_ID_SIGNATURE = 1,
2653    #[doc = "Signature for the Operator ID."]
2654    MAV_ODID_AUTH_TYPE_OPERATOR_ID_SIGNATURE = 2,
2655    #[doc = "Signature for the entire message set."]
2656    MAV_ODID_AUTH_TYPE_MESSAGE_SET_SIGNATURE = 3,
2657    #[doc = "Authentication is provided by Network Remote ID."]
2658    MAV_ODID_AUTH_TYPE_NETWORK_REMOTE_ID = 4,
2659    #[doc = "The exact authentication type is indicated by the first byte of authentication_data and these type values are managed by ICAO."]
2660    MAV_ODID_AUTH_TYPE_SPECIFIC_AUTHENTICATION = 5,
2661}
2662impl MavOdidAuthType {
2663    pub const DEFAULT: Self = Self::MAV_ODID_AUTH_TYPE_NONE;
2664}
2665impl Default for MavOdidAuthType {
2666    fn default() -> Self {
2667        Self::DEFAULT
2668    }
2669}
2670#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2671#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2672#[cfg_attr(feature = "serde", serde(tag = "type"))]
2673#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2674#[repr(u32)]
2675pub enum MavOdidCategoryEu {
2676    #[doc = "The category for the UA, according to the EU specification, is undeclared."]
2677    MAV_ODID_CATEGORY_EU_UNDECLARED = 0,
2678    #[doc = "The category for the UA, according to the EU specification, is the Open category."]
2679    MAV_ODID_CATEGORY_EU_OPEN = 1,
2680    #[doc = "The category for the UA, according to the EU specification, is the Specific category."]
2681    MAV_ODID_CATEGORY_EU_SPECIFIC = 2,
2682    #[doc = "The category for the UA, according to the EU specification, is the Certified category."]
2683    MAV_ODID_CATEGORY_EU_CERTIFIED = 3,
2684}
2685impl MavOdidCategoryEu {
2686    pub const DEFAULT: Self = Self::MAV_ODID_CATEGORY_EU_UNDECLARED;
2687}
2688impl Default for MavOdidCategoryEu {
2689    fn default() -> Self {
2690        Self::DEFAULT
2691    }
2692}
2693#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2694#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2695#[cfg_attr(feature = "serde", serde(tag = "type"))]
2696#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2697#[repr(u32)]
2698pub enum MavOdidClassEu {
2699    #[doc = "The class for the UA, according to the EU specification, is undeclared."]
2700    MAV_ODID_CLASS_EU_UNDECLARED = 0,
2701    #[doc = "The class for the UA, according to the EU specification, is Class 0."]
2702    MAV_ODID_CLASS_EU_CLASS_0 = 1,
2703    #[doc = "The class for the UA, according to the EU specification, is Class 1."]
2704    MAV_ODID_CLASS_EU_CLASS_1 = 2,
2705    #[doc = "The class for the UA, according to the EU specification, is Class 2."]
2706    MAV_ODID_CLASS_EU_CLASS_2 = 3,
2707    #[doc = "The class for the UA, according to the EU specification, is Class 3."]
2708    MAV_ODID_CLASS_EU_CLASS_3 = 4,
2709    #[doc = "The class for the UA, according to the EU specification, is Class 4."]
2710    MAV_ODID_CLASS_EU_CLASS_4 = 5,
2711    #[doc = "The class for the UA, according to the EU specification, is Class 5."]
2712    MAV_ODID_CLASS_EU_CLASS_5 = 6,
2713    #[doc = "The class for the UA, according to the EU specification, is Class 6."]
2714    MAV_ODID_CLASS_EU_CLASS_6 = 7,
2715}
2716impl MavOdidClassEu {
2717    pub const DEFAULT: Self = Self::MAV_ODID_CLASS_EU_UNDECLARED;
2718}
2719impl Default for MavOdidClassEu {
2720    fn default() -> Self {
2721        Self::DEFAULT
2722    }
2723}
2724#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2725#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2726#[cfg_attr(feature = "serde", serde(tag = "type"))]
2727#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2728#[repr(u32)]
2729pub enum MavOdidClassificationType {
2730    #[doc = "The classification type for the UA is undeclared."]
2731    MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED = 0,
2732    #[doc = "The classification type for the UA follows EU (European Union) specifications."]
2733    MAV_ODID_CLASSIFICATION_TYPE_EU = 1,
2734}
2735impl MavOdidClassificationType {
2736    pub const DEFAULT: Self = Self::MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED;
2737}
2738impl Default for MavOdidClassificationType {
2739    fn default() -> Self {
2740        Self::DEFAULT
2741    }
2742}
2743#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2744#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2745#[cfg_attr(feature = "serde", serde(tag = "type"))]
2746#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2747#[repr(u32)]
2748pub enum MavOdidDescType {
2749    #[doc = "Optional free-form text description of the purpose of the flight."]
2750    MAV_ODID_DESC_TYPE_TEXT = 0,
2751    #[doc = "Optional additional clarification when status == MAV_ODID_STATUS_EMERGENCY."]
2752    MAV_ODID_DESC_TYPE_EMERGENCY = 1,
2753    #[doc = "Optional additional clarification when status != MAV_ODID_STATUS_EMERGENCY."]
2754    MAV_ODID_DESC_TYPE_EXTENDED_STATUS = 2,
2755}
2756impl MavOdidDescType {
2757    pub const DEFAULT: Self = Self::MAV_ODID_DESC_TYPE_TEXT;
2758}
2759impl Default for MavOdidDescType {
2760    fn default() -> Self {
2761        Self::DEFAULT
2762    }
2763}
2764#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2765#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2766#[cfg_attr(feature = "serde", serde(tag = "type"))]
2767#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2768#[repr(u32)]
2769pub enum MavOdidHeightRef {
2770    #[doc = "The height field is relative to the take-off location."]
2771    MAV_ODID_HEIGHT_REF_OVER_TAKEOFF = 0,
2772    #[doc = "The height field is relative to ground."]
2773    MAV_ODID_HEIGHT_REF_OVER_GROUND = 1,
2774}
2775impl MavOdidHeightRef {
2776    pub const DEFAULT: Self = Self::MAV_ODID_HEIGHT_REF_OVER_TAKEOFF;
2777}
2778impl Default for MavOdidHeightRef {
2779    fn default() -> Self {
2780        Self::DEFAULT
2781    }
2782}
2783#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2784#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2785#[cfg_attr(feature = "serde", serde(tag = "type"))]
2786#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2787#[repr(u32)]
2788pub enum MavOdidHorAcc {
2789    #[doc = "The horizontal accuracy is unknown."]
2790    MAV_ODID_HOR_ACC_UNKNOWN = 0,
2791    #[doc = "The horizontal accuracy is smaller than 10 Nautical Miles. 18.52 km."]
2792    MAV_ODID_HOR_ACC_10NM = 1,
2793    #[doc = "The horizontal accuracy is smaller than 4 Nautical Miles. 7.408 km."]
2794    MAV_ODID_HOR_ACC_4NM = 2,
2795    #[doc = "The horizontal accuracy is smaller than 2 Nautical Miles. 3.704 km."]
2796    MAV_ODID_HOR_ACC_2NM = 3,
2797    #[doc = "The horizontal accuracy is smaller than 1 Nautical Miles. 1.852 km."]
2798    MAV_ODID_HOR_ACC_1NM = 4,
2799    #[doc = "The horizontal accuracy is smaller than 0.5 Nautical Miles. 926 m."]
2800    MAV_ODID_HOR_ACC_0_5NM = 5,
2801    #[doc = "The horizontal accuracy is smaller than 0.3 Nautical Miles. 555.6 m."]
2802    MAV_ODID_HOR_ACC_0_3NM = 6,
2803    #[doc = "The horizontal accuracy is smaller than 0.1 Nautical Miles. 185.2 m."]
2804    MAV_ODID_HOR_ACC_0_1NM = 7,
2805    #[doc = "The horizontal accuracy is smaller than 0.05 Nautical Miles. 92.6 m."]
2806    MAV_ODID_HOR_ACC_0_05NM = 8,
2807    #[doc = "The horizontal accuracy is smaller than 30 meter."]
2808    MAV_ODID_HOR_ACC_30_METER = 9,
2809    #[doc = "The horizontal accuracy is smaller than 10 meter."]
2810    MAV_ODID_HOR_ACC_10_METER = 10,
2811    #[doc = "The horizontal accuracy is smaller than 3 meter."]
2812    MAV_ODID_HOR_ACC_3_METER = 11,
2813    #[doc = "The horizontal accuracy is smaller than 1 meter."]
2814    MAV_ODID_HOR_ACC_1_METER = 12,
2815}
2816impl MavOdidHorAcc {
2817    pub const DEFAULT: Self = Self::MAV_ODID_HOR_ACC_UNKNOWN;
2818}
2819impl Default for MavOdidHorAcc {
2820    fn default() -> Self {
2821        Self::DEFAULT
2822    }
2823}
2824#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2825#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2826#[cfg_attr(feature = "serde", serde(tag = "type"))]
2827#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2828#[repr(u32)]
2829pub enum MavOdidIdType {
2830    #[doc = "No type defined."]
2831    MAV_ODID_ID_TYPE_NONE = 0,
2832    #[doc = "Manufacturer Serial Number (ANSI/CTA-2063 format)."]
2833    MAV_ODID_ID_TYPE_SERIAL_NUMBER = 1,
2834    #[doc = "CAA (Civil Aviation Authority) registered ID. Format: [ICAO Country Code].[CAA Assigned ID]."]
2835    MAV_ODID_ID_TYPE_CAA_REGISTRATION_ID = 2,
2836    #[doc = "UTM (Unmanned Traffic Management) assigned UUID (RFC4122)."]
2837    MAV_ODID_ID_TYPE_UTM_ASSIGNED_UUID = 3,
2838    #[doc = "A 20 byte ID for a specific flight/session. The exact ID type is indicated by the first byte of uas_id and these type values are managed by ICAO."]
2839    MAV_ODID_ID_TYPE_SPECIFIC_SESSION_ID = 4,
2840}
2841impl MavOdidIdType {
2842    pub const DEFAULT: Self = Self::MAV_ODID_ID_TYPE_NONE;
2843}
2844impl Default for MavOdidIdType {
2845    fn default() -> Self {
2846        Self::DEFAULT
2847    }
2848}
2849#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2850#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2851#[cfg_attr(feature = "serde", serde(tag = "type"))]
2852#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2853#[repr(u32)]
2854pub enum MavOdidOperatorIdType {
2855    #[doc = "CAA (Civil Aviation Authority) registered operator ID."]
2856    MAV_ODID_OPERATOR_ID_TYPE_CAA = 0,
2857}
2858impl MavOdidOperatorIdType {
2859    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_ID_TYPE_CAA;
2860}
2861impl Default for MavOdidOperatorIdType {
2862    fn default() -> Self {
2863        Self::DEFAULT
2864    }
2865}
2866#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2867#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2868#[cfg_attr(feature = "serde", serde(tag = "type"))]
2869#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2870#[repr(u32)]
2871pub enum MavOdidOperatorLocationType {
2872    #[doc = "The location/altitude of the operator is the same as the take-off location."]
2873    MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF = 0,
2874    #[doc = "The location/altitude of the operator is dynamic. E.g. based on live GNSS data."]
2875    MAV_ODID_OPERATOR_LOCATION_TYPE_LIVE_GNSS = 1,
2876    #[doc = "The location/altitude of the operator are fixed values."]
2877    MAV_ODID_OPERATOR_LOCATION_TYPE_FIXED = 2,
2878}
2879impl MavOdidOperatorLocationType {
2880    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF;
2881}
2882impl Default for MavOdidOperatorLocationType {
2883    fn default() -> Self {
2884        Self::DEFAULT
2885    }
2886}
2887#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2888#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2889#[cfg_attr(feature = "serde", serde(tag = "type"))]
2890#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2891#[repr(u32)]
2892pub enum MavOdidSpeedAcc {
2893    #[doc = "The speed accuracy is unknown."]
2894    MAV_ODID_SPEED_ACC_UNKNOWN = 0,
2895    #[doc = "The speed accuracy is smaller than 10 meters per second."]
2896    MAV_ODID_SPEED_ACC_10_METERS_PER_SECOND = 1,
2897    #[doc = "The speed accuracy is smaller than 3 meters per second."]
2898    MAV_ODID_SPEED_ACC_3_METERS_PER_SECOND = 2,
2899    #[doc = "The speed accuracy is smaller than 1 meters per second."]
2900    MAV_ODID_SPEED_ACC_1_METERS_PER_SECOND = 3,
2901    #[doc = "The speed accuracy is smaller than 0.3 meters per second."]
2902    MAV_ODID_SPEED_ACC_0_3_METERS_PER_SECOND = 4,
2903}
2904impl MavOdidSpeedAcc {
2905    pub const DEFAULT: Self = Self::MAV_ODID_SPEED_ACC_UNKNOWN;
2906}
2907impl Default for MavOdidSpeedAcc {
2908    fn default() -> Self {
2909        Self::DEFAULT
2910    }
2911}
2912#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2913#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2914#[cfg_attr(feature = "serde", serde(tag = "type"))]
2915#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2916#[repr(u32)]
2917pub enum MavOdidStatus {
2918    #[doc = "The status of the (UA) Unmanned Aircraft is undefined."]
2919    MAV_ODID_STATUS_UNDECLARED = 0,
2920    #[doc = "The UA is on the ground."]
2921    MAV_ODID_STATUS_GROUND = 1,
2922    #[doc = "The UA is in the air."]
2923    MAV_ODID_STATUS_AIRBORNE = 2,
2924    #[doc = "The UA is having an emergency."]
2925    MAV_ODID_STATUS_EMERGENCY = 3,
2926    #[doc = "The remote ID system is failing or unreliable in some way."]
2927    MAV_ODID_STATUS_REMOTE_ID_SYSTEM_FAILURE = 4,
2928}
2929impl MavOdidStatus {
2930    pub const DEFAULT: Self = Self::MAV_ODID_STATUS_UNDECLARED;
2931}
2932impl Default for MavOdidStatus {
2933    fn default() -> Self {
2934        Self::DEFAULT
2935    }
2936}
2937#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2938#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2939#[cfg_attr(feature = "serde", serde(tag = "type"))]
2940#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2941#[repr(u32)]
2942pub enum MavOdidTimeAcc {
2943    #[doc = "The timestamp accuracy is unknown."]
2944    MAV_ODID_TIME_ACC_UNKNOWN = 0,
2945    #[doc = "The timestamp accuracy is smaller than or equal to 0.1 second."]
2946    MAV_ODID_TIME_ACC_0_1_SECOND = 1,
2947    #[doc = "The timestamp accuracy is smaller than or equal to 0.2 second."]
2948    MAV_ODID_TIME_ACC_0_2_SECOND = 2,
2949    #[doc = "The timestamp accuracy is smaller than or equal to 0.3 second."]
2950    MAV_ODID_TIME_ACC_0_3_SECOND = 3,
2951    #[doc = "The timestamp accuracy is smaller than or equal to 0.4 second."]
2952    MAV_ODID_TIME_ACC_0_4_SECOND = 4,
2953    #[doc = "The timestamp accuracy is smaller than or equal to 0.5 second."]
2954    MAV_ODID_TIME_ACC_0_5_SECOND = 5,
2955    #[doc = "The timestamp accuracy is smaller than or equal to 0.6 second."]
2956    MAV_ODID_TIME_ACC_0_6_SECOND = 6,
2957    #[doc = "The timestamp accuracy is smaller than or equal to 0.7 second."]
2958    MAV_ODID_TIME_ACC_0_7_SECOND = 7,
2959    #[doc = "The timestamp accuracy is smaller than or equal to 0.8 second."]
2960    MAV_ODID_TIME_ACC_0_8_SECOND = 8,
2961    #[doc = "The timestamp accuracy is smaller than or equal to 0.9 second."]
2962    MAV_ODID_TIME_ACC_0_9_SECOND = 9,
2963    #[doc = "The timestamp accuracy is smaller than or equal to 1.0 second."]
2964    MAV_ODID_TIME_ACC_1_0_SECOND = 10,
2965    #[doc = "The timestamp accuracy is smaller than or equal to 1.1 second."]
2966    MAV_ODID_TIME_ACC_1_1_SECOND = 11,
2967    #[doc = "The timestamp accuracy is smaller than or equal to 1.2 second."]
2968    MAV_ODID_TIME_ACC_1_2_SECOND = 12,
2969    #[doc = "The timestamp accuracy is smaller than or equal to 1.3 second."]
2970    MAV_ODID_TIME_ACC_1_3_SECOND = 13,
2971    #[doc = "The timestamp accuracy is smaller than or equal to 1.4 second."]
2972    MAV_ODID_TIME_ACC_1_4_SECOND = 14,
2973    #[doc = "The timestamp accuracy is smaller than or equal to 1.5 second."]
2974    MAV_ODID_TIME_ACC_1_5_SECOND = 15,
2975}
2976impl MavOdidTimeAcc {
2977    pub const DEFAULT: Self = Self::MAV_ODID_TIME_ACC_UNKNOWN;
2978}
2979impl Default for MavOdidTimeAcc {
2980    fn default() -> Self {
2981        Self::DEFAULT
2982    }
2983}
2984#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2985#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2986#[cfg_attr(feature = "serde", serde(tag = "type"))]
2987#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2988#[repr(u32)]
2989pub enum MavOdidUaType {
2990    #[doc = "No UA (Unmanned Aircraft) type defined."]
2991    MAV_ODID_UA_TYPE_NONE = 0,
2992    #[doc = "Aeroplane/Airplane. Fixed wing."]
2993    MAV_ODID_UA_TYPE_AEROPLANE = 1,
2994    #[doc = "Helicopter or multirotor."]
2995    MAV_ODID_UA_TYPE_HELICOPTER_OR_MULTIROTOR = 2,
2996    #[doc = "Gyroplane."]
2997    MAV_ODID_UA_TYPE_GYROPLANE = 3,
2998    #[doc = "VTOL (Vertical Take-Off and Landing). Fixed wing aircraft that can take off vertically."]
2999    MAV_ODID_UA_TYPE_HYBRID_LIFT = 4,
3000    #[doc = "Ornithopter."]
3001    MAV_ODID_UA_TYPE_ORNITHOPTER = 5,
3002    #[doc = "Glider."]
3003    MAV_ODID_UA_TYPE_GLIDER = 6,
3004    #[doc = "Kite."]
3005    MAV_ODID_UA_TYPE_KITE = 7,
3006    #[doc = "Free Balloon."]
3007    MAV_ODID_UA_TYPE_FREE_BALLOON = 8,
3008    #[doc = "Captive Balloon."]
3009    MAV_ODID_UA_TYPE_CAPTIVE_BALLOON = 9,
3010    #[doc = "Airship. E.g. a blimp."]
3011    MAV_ODID_UA_TYPE_AIRSHIP = 10,
3012    #[doc = "Free Fall/Parachute (unpowered)."]
3013    MAV_ODID_UA_TYPE_FREE_FALL_PARACHUTE = 11,
3014    #[doc = "Rocket."]
3015    MAV_ODID_UA_TYPE_ROCKET = 12,
3016    #[doc = "Tethered powered aircraft."]
3017    MAV_ODID_UA_TYPE_TETHERED_POWERED_AIRCRAFT = 13,
3018    #[doc = "Ground Obstacle."]
3019    MAV_ODID_UA_TYPE_GROUND_OBSTACLE = 14,
3020    #[doc = "Other type of aircraft not listed earlier."]
3021    MAV_ODID_UA_TYPE_OTHER = 15,
3022}
3023impl MavOdidUaType {
3024    pub const DEFAULT: Self = Self::MAV_ODID_UA_TYPE_NONE;
3025}
3026impl Default for MavOdidUaType {
3027    fn default() -> Self {
3028        Self::DEFAULT
3029    }
3030}
3031#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3032#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3033#[cfg_attr(feature = "serde", serde(tag = "type"))]
3034#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3035#[repr(u32)]
3036pub enum MavOdidVerAcc {
3037    #[doc = "The vertical accuracy is unknown."]
3038    MAV_ODID_VER_ACC_UNKNOWN = 0,
3039    #[doc = "The vertical accuracy is smaller than 150 meter."]
3040    MAV_ODID_VER_ACC_150_METER = 1,
3041    #[doc = "The vertical accuracy is smaller than 45 meter."]
3042    MAV_ODID_VER_ACC_45_METER = 2,
3043    #[doc = "The vertical accuracy is smaller than 25 meter."]
3044    MAV_ODID_VER_ACC_25_METER = 3,
3045    #[doc = "The vertical accuracy is smaller than 10 meter."]
3046    MAV_ODID_VER_ACC_10_METER = 4,
3047    #[doc = "The vertical accuracy is smaller than 3 meter."]
3048    MAV_ODID_VER_ACC_3_METER = 5,
3049    #[doc = "The vertical accuracy is smaller than 1 meter."]
3050    MAV_ODID_VER_ACC_1_METER = 6,
3051}
3052impl MavOdidVerAcc {
3053    pub const DEFAULT: Self = Self::MAV_ODID_VER_ACC_UNKNOWN;
3054}
3055impl Default for MavOdidVerAcc {
3056    fn default() -> Self {
3057        Self::DEFAULT
3058    }
3059}
3060#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3061#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3062#[cfg_attr(feature = "serde", serde(tag = "type"))]
3063#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3064#[repr(u32)]
3065#[doc = "Specifies the datatype of a MAVLink extended parameter."]
3066pub enum MavParamExtType {
3067    #[doc = "8-bit unsigned integer"]
3068    MAV_PARAM_EXT_TYPE_UINT8 = 1,
3069    #[doc = "8-bit signed integer"]
3070    MAV_PARAM_EXT_TYPE_INT8 = 2,
3071    #[doc = "16-bit unsigned integer"]
3072    MAV_PARAM_EXT_TYPE_UINT16 = 3,
3073    #[doc = "16-bit signed integer"]
3074    MAV_PARAM_EXT_TYPE_INT16 = 4,
3075    #[doc = "32-bit unsigned integer"]
3076    MAV_PARAM_EXT_TYPE_UINT32 = 5,
3077    #[doc = "32-bit signed integer"]
3078    MAV_PARAM_EXT_TYPE_INT32 = 6,
3079    #[doc = "64-bit unsigned integer"]
3080    MAV_PARAM_EXT_TYPE_UINT64 = 7,
3081    #[doc = "64-bit signed integer"]
3082    MAV_PARAM_EXT_TYPE_INT64 = 8,
3083    #[doc = "32-bit floating-point"]
3084    MAV_PARAM_EXT_TYPE_REAL32 = 9,
3085    #[doc = "64-bit floating-point"]
3086    MAV_PARAM_EXT_TYPE_REAL64 = 10,
3087    #[doc = "Custom Type"]
3088    MAV_PARAM_EXT_TYPE_CUSTOM = 11,
3089}
3090impl MavParamExtType {
3091    pub const DEFAULT: Self = Self::MAV_PARAM_EXT_TYPE_UINT8;
3092}
3093impl Default for MavParamExtType {
3094    fn default() -> Self {
3095        Self::DEFAULT
3096    }
3097}
3098#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3099#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3100#[cfg_attr(feature = "serde", serde(tag = "type"))]
3101#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3102#[repr(u32)]
3103#[doc = "Specifies the datatype of a MAVLink parameter."]
3104pub enum MavParamType {
3105    #[doc = "8-bit unsigned integer"]
3106    MAV_PARAM_TYPE_UINT8 = 1,
3107    #[doc = "8-bit signed integer"]
3108    MAV_PARAM_TYPE_INT8 = 2,
3109    #[doc = "16-bit unsigned integer"]
3110    MAV_PARAM_TYPE_UINT16 = 3,
3111    #[doc = "16-bit signed integer"]
3112    MAV_PARAM_TYPE_INT16 = 4,
3113    #[doc = "32-bit unsigned integer"]
3114    MAV_PARAM_TYPE_UINT32 = 5,
3115    #[doc = "32-bit signed integer"]
3116    MAV_PARAM_TYPE_INT32 = 6,
3117    #[doc = "64-bit unsigned integer"]
3118    MAV_PARAM_TYPE_UINT64 = 7,
3119    #[doc = "64-bit signed integer"]
3120    MAV_PARAM_TYPE_INT64 = 8,
3121    #[doc = "32-bit floating-point"]
3122    MAV_PARAM_TYPE_REAL32 = 9,
3123    #[doc = "64-bit floating-point"]
3124    MAV_PARAM_TYPE_REAL64 = 10,
3125}
3126impl MavParamType {
3127    pub const DEFAULT: Self = Self::MAV_PARAM_TYPE_UINT8;
3128}
3129impl Default for MavParamType {
3130    fn default() -> Self {
3131        Self::DEFAULT
3132    }
3133}
3134bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Power supply status flags (bitmask)"] pub struct MavPowerStatus : u16 { # [doc = "main brick power supply valid"] const MAV_POWER_STATUS_BRICK_VALID = 1 ; # [doc = "main servo power supply valid for FMU"] const MAV_POWER_STATUS_SERVO_VALID = 2 ; # [doc = "USB power is connected"] const MAV_POWER_STATUS_USB_CONNECTED = 4 ; # [doc = "peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_OVERCURRENT = 8 ; # [doc = "hi-power peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_HIPOWER_OVERCURRENT = 16 ; # [doc = "Power status has changed since boot"] const MAV_POWER_STATUS_CHANGED = 32 ; } }
3135impl MavPowerStatus {
3136    pub const DEFAULT: Self = Self::MAV_POWER_STATUS_BRICK_VALID;
3137}
3138impl Default for MavPowerStatus {
3139    fn default() -> Self {
3140        Self::DEFAULT
3141    }
3142}
3143bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmask of (optional) autopilot capabilities (64 bit). If a bit is set, the autopilot supports this capability."] pub struct MavProtocolCapability : u64 { # [doc = "Autopilot supports the MISSION_ITEM float message type.           Note that MISSION_ITEM is deprecated, and autopilots should use MISSION_INT instead."] const MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT = 1 ; # [deprecated = " See `MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST` (Deprecated since 2022-03)"] # [doc = "Autopilot supports the new param float message type."] const MAV_PROTOCOL_CAPABILITY_PARAM_FLOAT = 2 ; # [doc = "Autopilot supports MISSION_ITEM_INT scaled integer message type.           Note that this flag must always be set if missions are supported, because missions must always use MISSION_ITEM_INT (rather than MISSION_ITEM, which is deprecated)."] const MAV_PROTOCOL_CAPABILITY_MISSION_INT = 4 ; # [doc = "Autopilot supports COMMAND_INT scaled integer message type."] const MAV_PROTOCOL_CAPABILITY_COMMAND_INT = 8 ; # [doc = "Parameter protocol uses byte-wise encoding of parameter values into param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE = 16 ; # [doc = "Autopilot supports the File Transfer Protocol v1: <https://mavlink.io/en/services/ftp.html>."] const MAV_PROTOCOL_CAPABILITY_FTP = 32 ; # [doc = "Autopilot supports commanding attitude offboard."] const MAV_PROTOCOL_CAPABILITY_SET_ATTITUDE_TARGET = 64 ; # [doc = "Autopilot supports commanding position and velocity targets in local NED frame."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_LOCAL_NED = 128 ; # [doc = "Autopilot supports commanding position and velocity targets in global scaled integers."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_GLOBAL_INT = 256 ; # [doc = "Autopilot supports terrain protocol / data handling."] const MAV_PROTOCOL_CAPABILITY_TERRAIN = 512 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED3 = 1024 ; # [doc = "Autopilot supports the MAV_CMD_DO_FLIGHTTERMINATION command (flight termination)."] const MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION = 2048 ; # [doc = "Autopilot supports onboard compass calibration."] const MAV_PROTOCOL_CAPABILITY_COMPASS_CALIBRATION = 4096 ; # [doc = "Autopilot supports MAVLink version 2."] const MAV_PROTOCOL_CAPABILITY_MAVLINK2 = 8192 ; # [doc = "Autopilot supports mission fence protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_FENCE = 16384 ; # [doc = "Autopilot supports mission rally point protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_RALLY = 32768 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED2 = 65536 ; # [doc = "Parameter protocol uses C-cast of parameter values to set the param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST = 131072 ; # [doc = "This component implements/is a gimbal manager. This means the GIMBAL_MANAGER_INFORMATION, and other messages can be requested."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_IMPLEMENTS_GIMBAL_MANAGER = 262144 ; # [doc = "Component supports locking control to a particular GCS independent of its system (via MAV_CMD_REQUEST_OPERATOR_CONTROL)."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_ACCEPTS_GCS_CONTROL = 524288 ; } }
3144impl MavProtocolCapability {
3145    pub const DEFAULT: Self = Self::MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT;
3146}
3147impl Default for MavProtocolCapability {
3148    fn default() -> Self {
3149        Self::DEFAULT
3150    }
3151}
3152#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3153#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3154#[cfg_attr(feature = "serde", serde(tag = "type"))]
3155#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3156#[repr(u32)]
3157#[doc = "Result from a MAVLink command (MAV_CMD)"]
3158pub enum MavResult {
3159    #[doc = "Command is valid (is supported and has valid parameters), and was executed."]
3160    MAV_RESULT_ACCEPTED = 0,
3161    #[doc = "Command is valid, but cannot be executed at this time. This is used to indicate a problem that should be fixed just by waiting (e.g. a state machine is busy, can't arm because have not got GPS lock, etc.). Retrying later should work."]
3162    MAV_RESULT_TEMPORARILY_REJECTED = 1,
3163    #[doc = "Command is invalid (is supported but has invalid parameters). Retrying same command and parameters will not work."]
3164    MAV_RESULT_DENIED = 2,
3165    #[doc = "Command is not supported (unknown)."]
3166    MAV_RESULT_UNSUPPORTED = 3,
3167    #[doc = "Command is valid, but execution has failed. This is used to indicate any non-temporary or unexpected problem, i.e. any problem that must be fixed before the command can succeed/be retried. For example, attempting to write a file when out of memory, attempting to arm when sensors are not calibrated, etc."]
3168    MAV_RESULT_FAILED = 4,
3169    #[doc = "Command is valid and is being executed. This will be followed by further progress updates, i.e. the component may send further COMMAND_ACK messages with result MAV_RESULT_IN_PROGRESS (at a rate decided by the implementation), and must terminate by sending a COMMAND_ACK message with final result of the operation. The COMMAND_ACK.progress field can be used to indicate the progress of the operation."]
3170    MAV_RESULT_IN_PROGRESS = 5,
3171    #[doc = "Command has been cancelled (as a result of receiving a COMMAND_CANCEL message)."]
3172    MAV_RESULT_CANCELLED = 6,
3173    #[doc = "Command is only accepted when sent as a COMMAND_LONG."]
3174    MAV_RESULT_COMMAND_LONG_ONLY = 7,
3175    #[doc = "Command is only accepted when sent as a COMMAND_INT."]
3176    MAV_RESULT_COMMAND_INT_ONLY = 8,
3177    #[doc = "Command is invalid because a frame is required and the specified frame is not supported."]
3178    MAV_RESULT_COMMAND_UNSUPPORTED_MAV_FRAME = 9,
3179}
3180impl MavResult {
3181    pub const DEFAULT: Self = Self::MAV_RESULT_ACCEPTED;
3182}
3183impl Default for MavResult {
3184    fn default() -> Self {
3185        Self::DEFAULT
3186    }
3187}
3188#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3189#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3190#[cfg_attr(feature = "serde", serde(tag = "type"))]
3191#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3192#[repr(u32)]
3193#[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
3194#[doc = "The ROI (region of interest) for the vehicle. This can be                 be used by the vehicle for camera/vehicle attitude alignment (see                 MAV_CMD_NAV_ROI)."]
3195pub enum MavRoi {
3196    #[doc = "No region of interest."]
3197    MAV_ROI_NONE = 0,
3198    #[doc = "Point toward next waypoint, with optional pitch/roll/yaw offset."]
3199    MAV_ROI_WPNEXT = 1,
3200    #[doc = "Point toward given waypoint."]
3201    MAV_ROI_WPINDEX = 2,
3202    #[doc = "Point toward fixed location."]
3203    MAV_ROI_LOCATION = 3,
3204    #[doc = "Point toward of given id."]
3205    MAV_ROI_TARGET = 4,
3206}
3207impl MavRoi {
3208    pub const DEFAULT: Self = Self::MAV_ROI_NONE;
3209}
3210impl Default for MavRoi {
3211    fn default() -> Self {
3212        Self::DEFAULT
3213    }
3214}
3215#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3216#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3217#[cfg_attr(feature = "serde", serde(tag = "type"))]
3218#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3219#[repr(u32)]
3220#[doc = "Enumeration of sensor orientation, according to its rotations"]
3221pub enum MavSensorOrientation {
3222    #[doc = "Roll: 0, Pitch: 0, Yaw: 0"]
3223    MAV_SENSOR_ROTATION_NONE = 0,
3224    #[doc = "Roll: 0, Pitch: 0, Yaw: 45"]
3225    MAV_SENSOR_ROTATION_YAW_45 = 1,
3226    #[doc = "Roll: 0, Pitch: 0, Yaw: 90"]
3227    MAV_SENSOR_ROTATION_YAW_90 = 2,
3228    #[doc = "Roll: 0, Pitch: 0, Yaw: 135"]
3229    MAV_SENSOR_ROTATION_YAW_135 = 3,
3230    #[doc = "Roll: 0, Pitch: 0, Yaw: 180"]
3231    MAV_SENSOR_ROTATION_YAW_180 = 4,
3232    #[doc = "Roll: 0, Pitch: 0, Yaw: 225"]
3233    MAV_SENSOR_ROTATION_YAW_225 = 5,
3234    #[doc = "Roll: 0, Pitch: 0, Yaw: 270"]
3235    MAV_SENSOR_ROTATION_YAW_270 = 6,
3236    #[doc = "Roll: 0, Pitch: 0, Yaw: 315"]
3237    MAV_SENSOR_ROTATION_YAW_315 = 7,
3238    #[doc = "Roll: 180, Pitch: 0, Yaw: 0"]
3239    MAV_SENSOR_ROTATION_ROLL_180 = 8,
3240    #[doc = "Roll: 180, Pitch: 0, Yaw: 45"]
3241    MAV_SENSOR_ROTATION_ROLL_180_YAW_45 = 9,
3242    #[doc = "Roll: 180, Pitch: 0, Yaw: 90"]
3243    MAV_SENSOR_ROTATION_ROLL_180_YAW_90 = 10,
3244    #[doc = "Roll: 180, Pitch: 0, Yaw: 135"]
3245    MAV_SENSOR_ROTATION_ROLL_180_YAW_135 = 11,
3246    #[doc = "Roll: 0, Pitch: 180, Yaw: 0"]
3247    MAV_SENSOR_ROTATION_PITCH_180 = 12,
3248    #[doc = "Roll: 180, Pitch: 0, Yaw: 225"]
3249    MAV_SENSOR_ROTATION_ROLL_180_YAW_225 = 13,
3250    #[doc = "Roll: 180, Pitch: 0, Yaw: 270"]
3251    MAV_SENSOR_ROTATION_ROLL_180_YAW_270 = 14,
3252    #[doc = "Roll: 180, Pitch: 0, Yaw: 315"]
3253    MAV_SENSOR_ROTATION_ROLL_180_YAW_315 = 15,
3254    #[doc = "Roll: 90, Pitch: 0, Yaw: 0"]
3255    MAV_SENSOR_ROTATION_ROLL_90 = 16,
3256    #[doc = "Roll: 90, Pitch: 0, Yaw: 45"]
3257    MAV_SENSOR_ROTATION_ROLL_90_YAW_45 = 17,
3258    #[doc = "Roll: 90, Pitch: 0, Yaw: 90"]
3259    MAV_SENSOR_ROTATION_ROLL_90_YAW_90 = 18,
3260    #[doc = "Roll: 90, Pitch: 0, Yaw: 135"]
3261    MAV_SENSOR_ROTATION_ROLL_90_YAW_135 = 19,
3262    #[doc = "Roll: 270, Pitch: 0, Yaw: 0"]
3263    MAV_SENSOR_ROTATION_ROLL_270 = 20,
3264    #[doc = "Roll: 270, Pitch: 0, Yaw: 45"]
3265    MAV_SENSOR_ROTATION_ROLL_270_YAW_45 = 21,
3266    #[doc = "Roll: 270, Pitch: 0, Yaw: 90"]
3267    MAV_SENSOR_ROTATION_ROLL_270_YAW_90 = 22,
3268    #[doc = "Roll: 270, Pitch: 0, Yaw: 135"]
3269    MAV_SENSOR_ROTATION_ROLL_270_YAW_135 = 23,
3270    #[doc = "Roll: 0, Pitch: 90, Yaw: 0"]
3271    MAV_SENSOR_ROTATION_PITCH_90 = 24,
3272    #[doc = "Roll: 0, Pitch: 270, Yaw: 0"]
3273    MAV_SENSOR_ROTATION_PITCH_270 = 25,
3274    #[doc = "Roll: 0, Pitch: 180, Yaw: 90"]
3275    MAV_SENSOR_ROTATION_PITCH_180_YAW_90 = 26,
3276    #[doc = "Roll: 0, Pitch: 180, Yaw: 270"]
3277    MAV_SENSOR_ROTATION_PITCH_180_YAW_270 = 27,
3278    #[doc = "Roll: 90, Pitch: 90, Yaw: 0"]
3279    MAV_SENSOR_ROTATION_ROLL_90_PITCH_90 = 28,
3280    #[doc = "Roll: 180, Pitch: 90, Yaw: 0"]
3281    MAV_SENSOR_ROTATION_ROLL_180_PITCH_90 = 29,
3282    #[doc = "Roll: 270, Pitch: 90, Yaw: 0"]
3283    MAV_SENSOR_ROTATION_ROLL_270_PITCH_90 = 30,
3284    #[doc = "Roll: 90, Pitch: 180, Yaw: 0"]
3285    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180 = 31,
3286    #[doc = "Roll: 270, Pitch: 180, Yaw: 0"]
3287    MAV_SENSOR_ROTATION_ROLL_270_PITCH_180 = 32,
3288    #[doc = "Roll: 90, Pitch: 270, Yaw: 0"]
3289    MAV_SENSOR_ROTATION_ROLL_90_PITCH_270 = 33,
3290    #[doc = "Roll: 180, Pitch: 270, Yaw: 0"]
3291    MAV_SENSOR_ROTATION_ROLL_180_PITCH_270 = 34,
3292    #[doc = "Roll: 270, Pitch: 270, Yaw: 0"]
3293    MAV_SENSOR_ROTATION_ROLL_270_PITCH_270 = 35,
3294    #[doc = "Roll: 90, Pitch: 180, Yaw: 90"]
3295    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180_YAW_90 = 36,
3296    #[doc = "Roll: 90, Pitch: 0, Yaw: 270"]
3297    MAV_SENSOR_ROTATION_ROLL_90_YAW_270 = 37,
3298    #[doc = "Roll: 90, Pitch: 68, Yaw: 293"]
3299    MAV_SENSOR_ROTATION_ROLL_90_PITCH_68_YAW_293 = 38,
3300    #[doc = "Pitch: 315"]
3301    MAV_SENSOR_ROTATION_PITCH_315 = 39,
3302    #[doc = "Roll: 90, Pitch: 315"]
3303    MAV_SENSOR_ROTATION_ROLL_90_PITCH_315 = 40,
3304    #[doc = "Custom orientation"]
3305    MAV_SENSOR_ROTATION_CUSTOM = 100,
3306}
3307impl MavSensorOrientation {
3308    pub const DEFAULT: Self = Self::MAV_SENSOR_ROTATION_NONE;
3309}
3310impl Default for MavSensorOrientation {
3311    fn default() -> Self {
3312        Self::DEFAULT
3313    }
3314}
3315#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3316#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3317#[cfg_attr(feature = "serde", serde(tag = "type"))]
3318#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3319#[repr(u32)]
3320#[doc = "Indicates the severity level, generally used for status messages to indicate their relative urgency. Based on RFC-5424 using expanded definitions at: <http://www.kiwisyslog.com/kb/info:-syslog-message-levels/>."]
3321pub enum MavSeverity {
3322    #[doc = "System is unusable. This is a \"panic\" condition."]
3323    MAV_SEVERITY_EMERGENCY = 0,
3324    #[doc = "Action should be taken immediately. Indicates error in non-critical systems."]
3325    MAV_SEVERITY_ALERT = 1,
3326    #[doc = "Action must be taken immediately. Indicates failure in a primary system."]
3327    MAV_SEVERITY_CRITICAL = 2,
3328    #[doc = "Indicates an error in secondary/redundant systems."]
3329    MAV_SEVERITY_ERROR = 3,
3330    #[doc = "Indicates about a possible future error if this is not resolved within a given timeframe. Example would be a low battery warning."]
3331    MAV_SEVERITY_WARNING = 4,
3332    #[doc = "An unusual event has occurred, though not an error condition. This should be investigated for the root cause."]
3333    MAV_SEVERITY_NOTICE = 5,
3334    #[doc = "Normal operational messages. Useful for logging. No action is required for these messages."]
3335    MAV_SEVERITY_INFO = 6,
3336    #[doc = "Useful non-operational messages that can assist in debugging. These should not occur during normal operation."]
3337    MAV_SEVERITY_DEBUG = 7,
3338}
3339impl MavSeverity {
3340    pub const DEFAULT: Self = Self::MAV_SEVERITY_EMERGENCY;
3341}
3342impl Default for MavSeverity {
3343    fn default() -> Self {
3344        Self::DEFAULT
3345    }
3346}
3347#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3348#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3349#[cfg_attr(feature = "serde", serde(tag = "type"))]
3350#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3351#[repr(u32)]
3352#[doc = "Standard modes with a well understood meaning across flight stacks and vehicle types.         For example, most flight stack have the concept of a \"return\" or \"RTL\" mode that takes a vehicle to safety, even though the precise mechanics of this mode may differ.         The modes supported by a flight stack can be queried using AVAILABLE_MODES and set using MAV_CMD_DO_SET_STANDARD_MODE.         The current mode is streamed in CURRENT_MODE.         See <https://mavlink.io/en/services/standard_modes.html>"]
3353pub enum MavStandardMode {
3354    #[doc = "Non standard mode.           This may be used when reporting the mode if the current flight mode is not a standard mode."]
3355    MAV_STANDARD_MODE_NON_STANDARD = 0,
3356    #[doc = "Position mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold both position and altitude against wind and external forces.           This mode can only be set by vehicles that can hold a fixed position.           Multicopter (MC) vehicles actively brake and hold both position and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to multicopter mode (if needed) but otherwise behave in the same way as MC vehicles.           Fixed-wing (FW) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3357    MAV_STANDARD_MODE_POSITION_HOLD = 1,
3358    #[doc = "Orbit (manual).           Position-controlled and stabilized manual mode.           The vehicle circles around a fixed setpoint in the horizontal plane at a particular radius, altitude, and direction.           Flight stacks may further allow manual control over the setpoint position, radius, direction, speed, and/or altitude of the circle, but this is not mandated.           Flight stacks may support the [MAV_CMD_DO_ORBIT](<https://mavlink.io/en/messages/common.html#MAV_CMD_DO_ORBIT>) for changing the orbit parameters.           MC and FW vehicles may support this mode.           Hybrid MC/FW (\"VTOL\") vehicles may support this mode in MC/FW or both modes; if the mode is not supported by the current configuration the vehicle should transition to the supported configuration.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3359    MAV_STANDARD_MODE_ORBIT = 2,
3360    #[doc = "Cruise mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their original track against wind and external forces.           Fixed-wing (FW) vehicles level orientation and maintain current track and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to FW mode (if needed) but otherwise behave in the same way as MC vehicles.           Multicopter (MC) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3361    MAV_STANDARD_MODE_CRUISE = 3,
3362    #[doc = "Altitude hold (manual).           Altitude-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their altitude.           MC vehicles continue with existing momentum and may move with wind (or other external forces).           FW vehicles continue with current heading, but may be moved off-track by wind.           Hybrid MC/FW (\"VTOL\") vehicles behave according to their current configuration/mode (FW or MC).           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3363    MAV_STANDARD_MODE_ALTITUDE_HOLD = 4,
3364    #[doc = "Safe recovery mode (auto).           Automatic mode that takes vehicle to a predefined safe location via a safe flight path, and may also automatically land the vehicle.           This mode is more commonly referred to as RTL and/or or Smart RTL.           The precise return location, flight path, and landing behaviour depend on vehicle configuration and type.           For example, the vehicle might return to the home/launch location, a rally point, or the start of a mission landing, it might follow a direct path, mission path, or breadcrumb path, and land using a mission landing pattern or some other kind of descent."]
3365    MAV_STANDARD_MODE_SAFE_RECOVERY = 5,
3366    #[doc = "Mission mode (automatic).           Automatic mode that executes MAVLink missions.           Missions are executed from the current waypoint as soon as the mode is enabled."]
3367    MAV_STANDARD_MODE_MISSION = 6,
3368    #[doc = "Land mode (auto).           Automatic mode that lands the vehicle at the current location.           The precise landing behaviour depends on vehicle configuration and type."]
3369    MAV_STANDARD_MODE_LAND = 7,
3370    #[doc = "Takeoff mode (auto).           Automatic takeoff mode.           The precise takeoff behaviour depends on vehicle configuration and type."]
3371    MAV_STANDARD_MODE_TAKEOFF = 8,
3372}
3373impl MavStandardMode {
3374    pub const DEFAULT: Self = Self::MAV_STANDARD_MODE_NON_STANDARD;
3375}
3376impl Default for MavStandardMode {
3377    fn default() -> Self {
3378        Self::DEFAULT
3379    }
3380}
3381#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3382#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3383#[cfg_attr(feature = "serde", serde(tag = "type"))]
3384#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3385#[repr(u32)]
3386pub enum MavState {
3387    #[doc = "Uninitialized system, state is unknown."]
3388    MAV_STATE_UNINIT = 0,
3389    #[doc = "System is booting up."]
3390    MAV_STATE_BOOT = 1,
3391    #[doc = "System is calibrating and not flight-ready."]
3392    MAV_STATE_CALIBRATING = 2,
3393    #[doc = "System is grounded and on standby. It can be launched any time."]
3394    MAV_STATE_STANDBY = 3,
3395    #[doc = "System is active and might be already airborne. Motors are engaged."]
3396    MAV_STATE_ACTIVE = 4,
3397    #[doc = "System is in a non-normal flight mode (failsafe). It can however still navigate."]
3398    MAV_STATE_CRITICAL = 5,
3399    #[doc = "System is in a non-normal flight mode (failsafe). It lost control over parts or over the whole airframe. It is in mayday and going down."]
3400    MAV_STATE_EMERGENCY = 6,
3401    #[doc = "System just initialized its power-down sequence, will shut down now."]
3402    MAV_STATE_POWEROFF = 7,
3403    #[doc = "System is terminating itself (failsafe or commanded)."]
3404    MAV_STATE_FLIGHT_TERMINATION = 8,
3405}
3406impl MavState {
3407    pub const DEFAULT: Self = Self::MAV_STATE_UNINIT;
3408}
3409impl Default for MavState {
3410    fn default() -> Self {
3411        Self::DEFAULT
3412    }
3413}
3414bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message."] pub struct MavSysStatusSensor : u32 { # [doc = "0x01 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO = 1 ; # [doc = "0x02 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL = 2 ; # [doc = "0x04 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG = 4 ; # [doc = "0x08 absolute pressure"] const MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE = 8 ; # [doc = "0x10 differential pressure"] const MAV_SYS_STATUS_SENSOR_DIFFERENTIAL_PRESSURE = 16 ; # [doc = "0x20 GPS"] const MAV_SYS_STATUS_SENSOR_GPS = 32 ; # [doc = "0x40 optical flow"] const MAV_SYS_STATUS_SENSOR_OPTICAL_FLOW = 64 ; # [doc = "0x80 computer vision position"] const MAV_SYS_STATUS_SENSOR_VISION_POSITION = 128 ; # [doc = "0x100 laser based position"] const MAV_SYS_STATUS_SENSOR_LASER_POSITION = 256 ; # [doc = "0x200 external ground truth (Vicon or Leica)"] const MAV_SYS_STATUS_SENSOR_EXTERNAL_GROUND_TRUTH = 512 ; # [doc = "0x400 3D angular rate control"] const MAV_SYS_STATUS_SENSOR_ANGULAR_RATE_CONTROL = 1024 ; # [doc = "0x800 attitude stabilization"] const MAV_SYS_STATUS_SENSOR_ATTITUDE_STABILIZATION = 2048 ; # [doc = "0x1000 yaw position"] const MAV_SYS_STATUS_SENSOR_YAW_POSITION = 4096 ; # [doc = "0x2000 z/altitude control"] const MAV_SYS_STATUS_SENSOR_Z_ALTITUDE_CONTROL = 8192 ; # [doc = "0x4000 x/y position control"] const MAV_SYS_STATUS_SENSOR_XY_POSITION_CONTROL = 16384 ; # [doc = "0x8000 motor outputs / control"] const MAV_SYS_STATUS_SENSOR_MOTOR_OUTPUTS = 32768 ; # [doc = "0x10000 RC receiver"] const MAV_SYS_STATUS_SENSOR_RC_RECEIVER = 65536 ; # [doc = "0x20000 2nd 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO2 = 131072 ; # [doc = "0x40000 2nd 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL2 = 262144 ; # [doc = "0x80000 2nd 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG2 = 524288 ; # [doc = "0x100000 geofence"] const MAV_SYS_STATUS_GEOFENCE = 1048576 ; # [doc = "0x200000 AHRS subsystem health"] const MAV_SYS_STATUS_AHRS = 2097152 ; # [doc = "0x400000 Terrain subsystem health"] const MAV_SYS_STATUS_TERRAIN = 4194304 ; # [doc = "0x800000 Motors are reversed"] const MAV_SYS_STATUS_REVERSE_MOTOR = 8388608 ; # [doc = "0x1000000 Logging"] const MAV_SYS_STATUS_LOGGING = 16777216 ; # [doc = "0x2000000 Battery"] const MAV_SYS_STATUS_SENSOR_BATTERY = 33554432 ; # [doc = "0x4000000 Proximity"] const MAV_SYS_STATUS_SENSOR_PROXIMITY = 67108864 ; # [doc = "0x8000000 Satellite Communication"] const MAV_SYS_STATUS_SENSOR_SATCOM = 134217728 ; # [doc = "0x10000000 pre-arm check status. Always healthy when armed"] const MAV_SYS_STATUS_PREARM_CHECK = 268435456 ; # [doc = "0x20000000 Avoidance/collision prevention"] const MAV_SYS_STATUS_OBSTACLE_AVOIDANCE = 536870912 ; # [doc = "0x40000000 propulsion (actuator, esc, motor or propellor)"] const MAV_SYS_STATUS_SENSOR_PROPULSION = 1073741824 ; # [doc = "0x80000000 Extended bit-field are used for further sensor status bits (needs to be set in onboard_control_sensors_present only)"] const MAV_SYS_STATUS_EXTENSION_USED = 2147483648 ; } }
3415impl MavSysStatusSensor {
3416    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_SENSOR_3D_GYRO;
3417}
3418impl Default for MavSysStatusSensor {
3419    fn default() -> Self {
3420        Self::DEFAULT
3421    }
3422}
3423bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message in the extended fields."] pub struct MavSysStatusSensorExtended : u32 { # [doc = "0x01 Recovery system (parachute, balloon, retracts etc)"] const MAV_SYS_STATUS_RECOVERY_SYSTEM = 1 ; } }
3424impl MavSysStatusSensorExtended {
3425    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_RECOVERY_SYSTEM;
3426}
3427impl Default for MavSysStatusSensorExtended {
3428    fn default() -> Self {
3429        Self::DEFAULT
3430    }
3431}
3432#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3433#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3434#[cfg_attr(feature = "serde", serde(tag = "type"))]
3435#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3436#[repr(u32)]
3437pub enum MavTunnelPayloadType {
3438    #[doc = "Encoding of payload unknown."]
3439    MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN = 0,
3440    #[doc = "Registered for STorM32 gimbal controller."]
3441    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED0 = 200,
3442    #[doc = "Registered for STorM32 gimbal controller."]
3443    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED1 = 201,
3444    #[doc = "Registered for STorM32 gimbal controller."]
3445    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED2 = 202,
3446    #[doc = "Registered for STorM32 gimbal controller."]
3447    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED3 = 203,
3448    #[doc = "Registered for STorM32 gimbal controller."]
3449    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED4 = 204,
3450    #[doc = "Registered for STorM32 gimbal controller."]
3451    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED5 = 205,
3452    #[doc = "Registered for STorM32 gimbal controller."]
3453    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED6 = 206,
3454    #[doc = "Registered for STorM32 gimbal controller."]
3455    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED7 = 207,
3456    #[doc = "Registered for STorM32 gimbal controller."]
3457    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED8 = 208,
3458    #[doc = "Registered for STorM32 gimbal controller."]
3459    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED9 = 209,
3460    #[doc = "Registered for ModalAI remote OSD protocol."]
3461    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_REMOTE_OSD = 210,
3462    #[doc = "Registered for ModalAI ESC UART passthru protocol."]
3463    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_ESC_UART_PASSTHRU = 211,
3464    #[doc = "Registered for ModalAI vendor use."]
3465    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_IO_UART_PASSTHRU = 212,
3466}
3467impl MavTunnelPayloadType {
3468    pub const DEFAULT: Self = Self::MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN;
3469}
3470impl Default for MavTunnelPayloadType {
3471    fn default() -> Self {
3472        Self::DEFAULT
3473    }
3474}
3475#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3476#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3477#[cfg_attr(feature = "serde", serde(tag = "type"))]
3478#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3479#[repr(u32)]
3480#[doc = "MAVLINK component type reported in HEARTBEAT message. Flight controllers must report the type of the vehicle on which they are mounted (e.g. MAV_TYPE_OCTOROTOR). All other components must report a value appropriate for their type (e.g. a camera must use MAV_TYPE_CAMERA)."]
3481pub enum MavType {
3482    #[doc = "Generic micro air vehicle"]
3483    MAV_TYPE_GENERIC = 0,
3484    #[doc = "Fixed wing aircraft."]
3485    MAV_TYPE_FIXED_WING = 1,
3486    #[doc = "Quadrotor"]
3487    MAV_TYPE_QUADROTOR = 2,
3488    #[doc = "Coaxial helicopter"]
3489    MAV_TYPE_COAXIAL = 3,
3490    #[doc = "Normal helicopter with tail rotor."]
3491    MAV_TYPE_HELICOPTER = 4,
3492    #[doc = "Ground installation"]
3493    MAV_TYPE_ANTENNA_TRACKER = 5,
3494    #[doc = "Operator control unit / ground control station"]
3495    MAV_TYPE_GCS = 6,
3496    #[doc = "Airship, controlled"]
3497    MAV_TYPE_AIRSHIP = 7,
3498    #[doc = "Free balloon, uncontrolled"]
3499    MAV_TYPE_FREE_BALLOON = 8,
3500    #[doc = "Rocket"]
3501    MAV_TYPE_ROCKET = 9,
3502    #[doc = "Ground rover"]
3503    MAV_TYPE_GROUND_ROVER = 10,
3504    #[doc = "Surface vessel, boat, ship"]
3505    MAV_TYPE_SURFACE_BOAT = 11,
3506    #[doc = "Submarine"]
3507    MAV_TYPE_SUBMARINE = 12,
3508    #[doc = "Hexarotor"]
3509    MAV_TYPE_HEXAROTOR = 13,
3510    #[doc = "Octorotor"]
3511    MAV_TYPE_OCTOROTOR = 14,
3512    #[doc = "Tricopter"]
3513    MAV_TYPE_TRICOPTER = 15,
3514    #[doc = "Flapping wing"]
3515    MAV_TYPE_FLAPPING_WING = 16,
3516    #[doc = "Kite"]
3517    MAV_TYPE_KITE = 17,
3518    #[doc = "Onboard companion controller"]
3519    MAV_TYPE_ONBOARD_CONTROLLER = 18,
3520    #[doc = "Two-rotor Tailsitter VTOL that additionally uses control surfaces in vertical operation. Note, value previously named MAV_TYPE_VTOL_DUOROTOR."]
3521    MAV_TYPE_VTOL_TAILSITTER_DUOROTOR = 19,
3522    #[doc = "Quad-rotor Tailsitter VTOL using a V-shaped quad config in vertical operation. Note: value previously named MAV_TYPE_VTOL_QUADROTOR."]
3523    MAV_TYPE_VTOL_TAILSITTER_QUADROTOR = 20,
3524    #[doc = "Tiltrotor VTOL. Fuselage and wings stay (nominally) horizontal in all flight phases. It able to tilt (some) rotors to provide thrust in cruise flight."]
3525    MAV_TYPE_VTOL_TILTROTOR = 21,
3526    #[doc = "VTOL with separate fixed rotors for hover and cruise flight. Fuselage and wings stay (nominally) horizontal in all flight phases."]
3527    MAV_TYPE_VTOL_FIXEDROTOR = 22,
3528    #[doc = "Tailsitter VTOL. Fuselage and wings orientation changes depending on flight phase: vertical for hover, horizontal for cruise. Use more specific VTOL MAV_TYPE_VTOL_TAILSITTER_DUOROTOR or MAV_TYPE_VTOL_TAILSITTER_QUADROTOR if appropriate."]
3529    MAV_TYPE_VTOL_TAILSITTER = 23,
3530    #[doc = "Tiltwing VTOL. Fuselage stays horizontal in all flight phases. The whole wing, along with any attached engine, can tilt between vertical and horizontal mode."]
3531    MAV_TYPE_VTOL_TILTWING = 24,
3532    #[doc = "VTOL reserved 5"]
3533    MAV_TYPE_VTOL_RESERVED5 = 25,
3534    #[doc = "Gimbal"]
3535    MAV_TYPE_GIMBAL = 26,
3536    #[doc = "ADSB system"]
3537    MAV_TYPE_ADSB = 27,
3538    #[doc = "Steerable, nonrigid airfoil"]
3539    MAV_TYPE_PARAFOIL = 28,
3540    #[doc = "Dodecarotor"]
3541    MAV_TYPE_DODECAROTOR = 29,
3542    #[doc = "Camera"]
3543    MAV_TYPE_CAMERA = 30,
3544    #[doc = "Charging station"]
3545    MAV_TYPE_CHARGING_STATION = 31,
3546    #[doc = "FLARM collision avoidance system"]
3547    MAV_TYPE_FLARM = 32,
3548    #[doc = "Servo"]
3549    MAV_TYPE_SERVO = 33,
3550    #[doc = "Open Drone ID. See <https://mavlink.io/en/services/opendroneid.html>."]
3551    MAV_TYPE_ODID = 34,
3552    #[doc = "Decarotor"]
3553    MAV_TYPE_DECAROTOR = 35,
3554    #[doc = "Battery"]
3555    MAV_TYPE_BATTERY = 36,
3556    #[doc = "Parachute"]
3557    MAV_TYPE_PARACHUTE = 37,
3558    #[doc = "Log"]
3559    MAV_TYPE_LOG = 38,
3560    #[doc = "OSD"]
3561    MAV_TYPE_OSD = 39,
3562    #[doc = "IMU"]
3563    MAV_TYPE_IMU = 40,
3564    #[doc = "GPS"]
3565    MAV_TYPE_GPS = 41,
3566    #[doc = "Winch"]
3567    MAV_TYPE_WINCH = 42,
3568    #[doc = "Generic multirotor that does not fit into a specific type or whose type is unknown"]
3569    MAV_TYPE_GENERIC_MULTIROTOR = 43,
3570    #[doc = "Illuminator. An illuminator is a light source that is used for lighting up dark areas external to the sytstem: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
3571    MAV_TYPE_ILLUMINATOR = 44,
3572    #[doc = "Orbiter spacecraft. Includes satellites orbiting terrestrial and extra-terrestrial bodies. Follows NASA Spacecraft Classification."]
3573    MAV_TYPE_SPACECRAFT_ORBITER = 45,
3574}
3575impl MavType {
3576    pub const DEFAULT: Self = Self::MAV_TYPE_GENERIC;
3577}
3578impl Default for MavType {
3579    fn default() -> Self {
3580        Self::DEFAULT
3581    }
3582}
3583#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3584#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3585#[cfg_attr(feature = "serde", serde(tag = "type"))]
3586#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3587#[repr(u32)]
3588#[doc = "Enumeration of VTOL states"]
3589pub enum MavVtolState {
3590    #[doc = "MAV is not configured as VTOL"]
3591    MAV_VTOL_STATE_UNDEFINED = 0,
3592    #[doc = "VTOL is in transition from multicopter to fixed-wing"]
3593    MAV_VTOL_STATE_TRANSITION_TO_FW = 1,
3594    #[doc = "VTOL is in transition from fixed-wing to multicopter"]
3595    MAV_VTOL_STATE_TRANSITION_TO_MC = 2,
3596    #[doc = "VTOL is in multicopter state"]
3597    MAV_VTOL_STATE_MC = 3,
3598    #[doc = "VTOL is in fixed-wing state"]
3599    MAV_VTOL_STATE_FW = 4,
3600}
3601impl MavVtolState {
3602    pub const DEFAULT: Self = Self::MAV_VTOL_STATE_UNDEFINED;
3603}
3604impl Default for MavVtolState {
3605    fn default() -> Self {
3606        Self::DEFAULT
3607    }
3608}
3609bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Winch status flags used in WINCH_STATUS"] pub struct MavWinchStatusFlag : u32 { # [doc = "Winch is healthy"] const MAV_WINCH_STATUS_HEALTHY = 1 ; # [doc = "Winch line is fully retracted"] const MAV_WINCH_STATUS_FULLY_RETRACTED = 2 ; # [doc = "Winch motor is moving"] const MAV_WINCH_STATUS_MOVING = 4 ; # [doc = "Winch clutch is engaged allowing motor to move freely."] const MAV_WINCH_STATUS_CLUTCH_ENGAGED = 8 ; # [doc = "Winch is locked by locking mechanism."] const MAV_WINCH_STATUS_LOCKED = 16 ; # [doc = "Winch is gravity dropping payload."] const MAV_WINCH_STATUS_DROPPING = 32 ; # [doc = "Winch is arresting payload descent."] const MAV_WINCH_STATUS_ARRESTING = 64 ; # [doc = "Winch is using torque measurements to sense the ground."] const MAV_WINCH_STATUS_GROUND_SENSE = 128 ; # [doc = "Winch is returning to the fully retracted position."] const MAV_WINCH_STATUS_RETRACTING = 256 ; # [doc = "Winch is redelivering the payload. This is a failover state if the line tension goes above a threshold during RETRACTING."] const MAV_WINCH_STATUS_REDELIVER = 512 ; # [doc = "Winch is abandoning the line and possibly payload. Winch unspools the entire calculated line length. This is a failover state from REDELIVER if the number of attempts exceeds a threshold."] const MAV_WINCH_STATUS_ABANDON_LINE = 1024 ; # [doc = "Winch is engaging the locking mechanism."] const MAV_WINCH_STATUS_LOCKING = 2048 ; # [doc = "Winch is spooling on line."] const MAV_WINCH_STATUS_LOAD_LINE = 4096 ; # [doc = "Winch is loading a payload."] const MAV_WINCH_STATUS_LOAD_PAYLOAD = 8192 ; } }
3610impl MavWinchStatusFlag {
3611    pub const DEFAULT: Self = Self::MAV_WINCH_STATUS_HEALTHY;
3612}
3613impl Default for MavWinchStatusFlag {
3614    fn default() -> Self {
3615        Self::DEFAULT
3616    }
3617}
3618#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3619#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3620#[cfg_attr(feature = "serde", serde(tag = "type"))]
3621#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3622#[repr(u32)]
3623pub enum MavlinkDataStreamType {
3624    MAVLINK_DATA_STREAM_IMG_JPEG = 0,
3625    MAVLINK_DATA_STREAM_IMG_BMP = 1,
3626    MAVLINK_DATA_STREAM_IMG_RAW8U = 2,
3627    MAVLINK_DATA_STREAM_IMG_RAW32U = 3,
3628    MAVLINK_DATA_STREAM_IMG_PGM = 4,
3629    MAVLINK_DATA_STREAM_IMG_PNG = 5,
3630}
3631impl MavlinkDataStreamType {
3632    pub const DEFAULT: Self = Self::MAVLINK_DATA_STREAM_IMG_JPEG;
3633}
3634impl Default for MavlinkDataStreamType {
3635    fn default() -> Self {
3636        Self::DEFAULT
3637    }
3638}
3639#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3640#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3641#[cfg_attr(feature = "serde", serde(tag = "type"))]
3642#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3643#[repr(u32)]
3644#[doc = "States of the mission state machine.         Note that these states are independent of whether the mission is in a mode that can execute mission items or not (is suspended).         They may not all be relevant on all vehicles."]
3645pub enum MissionState {
3646    #[doc = "The mission status reporting is not supported."]
3647    MISSION_STATE_UNKNOWN = 0,
3648    #[doc = "No mission on the vehicle."]
3649    MISSION_STATE_NO_MISSION = 1,
3650    #[doc = "Mission has not started. This is the case after a mission has uploaded but not yet started executing."]
3651    MISSION_STATE_NOT_STARTED = 2,
3652    #[doc = "Mission is active, and will execute mission items when in auto mode."]
3653    MISSION_STATE_ACTIVE = 3,
3654    #[doc = "Mission is paused when in auto mode."]
3655    MISSION_STATE_PAUSED = 4,
3656    #[doc = "Mission has executed all mission items."]
3657    MISSION_STATE_COMPLETE = 5,
3658}
3659impl MissionState {
3660    pub const DEFAULT: Self = Self::MISSION_STATE_UNKNOWN;
3661}
3662impl Default for MissionState {
3663    fn default() -> Self {
3664        Self::DEFAULT
3665    }
3666}
3667#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3668#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3669#[cfg_attr(feature = "serde", serde(tag = "type"))]
3670#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3671#[repr(u32)]
3672#[doc = "Sequence that motors are tested when using MAV_CMD_DO_MOTOR_TEST."]
3673pub enum MotorTestOrder {
3674    #[doc = "Default autopilot motor test method."]
3675    MOTOR_TEST_ORDER_DEFAULT = 0,
3676    #[doc = "Motor numbers are specified as their index in a predefined vehicle-specific sequence."]
3677    MOTOR_TEST_ORDER_SEQUENCE = 1,
3678    #[doc = "Motor numbers are specified as the output as labeled on the board."]
3679    MOTOR_TEST_ORDER_BOARD = 2,
3680}
3681impl MotorTestOrder {
3682    pub const DEFAULT: Self = Self::MOTOR_TEST_ORDER_DEFAULT;
3683}
3684impl Default for MotorTestOrder {
3685    fn default() -> Self {
3686        Self::DEFAULT
3687    }
3688}
3689#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3690#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3691#[cfg_attr(feature = "serde", serde(tag = "type"))]
3692#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3693#[repr(u32)]
3694#[doc = "Defines how throttle value is represented in MAV_CMD_DO_MOTOR_TEST."]
3695pub enum MotorTestThrottleType {
3696    #[doc = "Throttle as a percentage (0 ~ 100)"]
3697    MOTOR_TEST_THROTTLE_PERCENT = 0,
3698    #[doc = "Throttle as an absolute PWM value (normally in range of 1000~2000)."]
3699    MOTOR_TEST_THROTTLE_PWM = 1,
3700    #[doc = "Throttle pass-through from pilot's transmitter."]
3701    MOTOR_TEST_THROTTLE_PILOT = 2,
3702    #[doc = "Per-motor compass calibration test."]
3703    MOTOR_TEST_COMPASS_CAL = 3,
3704}
3705impl MotorTestThrottleType {
3706    pub const DEFAULT: Self = Self::MOTOR_TEST_THROTTLE_PERCENT;
3707}
3708impl Default for MotorTestThrottleType {
3709    fn default() -> Self {
3710        Self::DEFAULT
3711    }
3712}
3713#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3714#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3715#[cfg_attr(feature = "serde", serde(tag = "type"))]
3716#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3717#[repr(u32)]
3718pub enum NavVtolLandOptions {
3719    #[doc = "Default autopilot landing behaviour."]
3720    NAV_VTOL_LAND_OPTIONS_DEFAULT = 0,
3721    #[doc = "Descend in fixed wing mode, transitioning to multicopter mode for vertical landing when close to the ground.           The fixed wing descent pattern is at the discretion of the vehicle (e.g. transition altitude, loiter direction, radius, and speed, etc.)."]
3722    NAV_VTOL_LAND_OPTIONS_FW_DESCENT = 1,
3723    #[doc = "Land in multicopter mode on reaching the landing coordinates (the whole landing is by \"hover descent\")."]
3724    NAV_VTOL_LAND_OPTIONS_HOVER_DESCENT = 2,
3725}
3726impl NavVtolLandOptions {
3727    pub const DEFAULT: Self = Self::NAV_VTOL_LAND_OPTIONS_DEFAULT;
3728}
3729impl Default for NavVtolLandOptions {
3730    fn default() -> Self {
3731        Self::DEFAULT
3732    }
3733}
3734#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3735#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3736#[cfg_attr(feature = "serde", serde(tag = "type"))]
3737#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3738#[repr(u32)]
3739#[doc = "Yaw behaviour during orbit flight."]
3740pub enum OrbitYawBehaviour {
3741    #[doc = "Vehicle front points to the center (default)."]
3742    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER = 0,
3743    #[doc = "Vehicle front holds heading when message received."]
3744    ORBIT_YAW_BEHAVIOUR_HOLD_INITIAL_HEADING = 1,
3745    #[doc = "Yaw uncontrolled."]
3746    ORBIT_YAW_BEHAVIOUR_UNCONTROLLED = 2,
3747    #[doc = "Vehicle front follows flight path (tangential to circle)."]
3748    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TANGENT_TO_CIRCLE = 3,
3749    #[doc = "Yaw controlled by RC input."]
3750    ORBIT_YAW_BEHAVIOUR_RC_CONTROLLED = 4,
3751    #[doc = "Vehicle uses current yaw behaviour (unchanged). The vehicle-default yaw behaviour is used if this value is specified when orbit is first commanded."]
3752    ORBIT_YAW_BEHAVIOUR_UNCHANGED = 5,
3753}
3754impl OrbitYawBehaviour {
3755    pub const DEFAULT: Self = Self::ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER;
3756}
3757impl Default for OrbitYawBehaviour {
3758    fn default() -> Self {
3759        Self::DEFAULT
3760    }
3761}
3762#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3763#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3764#[cfg_attr(feature = "serde", serde(tag = "type"))]
3765#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3766#[repr(u32)]
3767#[doc = "Parachute actions. Trigger release and enable/disable auto-release."]
3768pub enum ParachuteAction {
3769    #[doc = "Disable auto-release of parachute (i.e. release triggered by crash detectors)."]
3770    PARACHUTE_DISABLE = 0,
3771    #[doc = "Enable auto-release of parachute."]
3772    PARACHUTE_ENABLE = 1,
3773    #[doc = "Release parachute and kill motors."]
3774    PARACHUTE_RELEASE = 2,
3775}
3776impl ParachuteAction {
3777    pub const DEFAULT: Self = Self::PARACHUTE_DISABLE;
3778}
3779impl Default for ParachuteAction {
3780    fn default() -> Self {
3781        Self::DEFAULT
3782    }
3783}
3784#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3785#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3786#[cfg_attr(feature = "serde", serde(tag = "type"))]
3787#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3788#[repr(u32)]
3789#[doc = "Result from PARAM_EXT_SET message."]
3790pub enum ParamAck {
3791    #[doc = "Parameter value ACCEPTED and SET"]
3792    PARAM_ACK_ACCEPTED = 0,
3793    #[doc = "Parameter value UNKNOWN/UNSUPPORTED"]
3794    PARAM_ACK_VALUE_UNSUPPORTED = 1,
3795    #[doc = "Parameter failed to set"]
3796    PARAM_ACK_FAILED = 2,
3797    #[doc = "Parameter value received but not yet set/accepted. A subsequent PARAM_EXT_ACK with the final result will follow once operation is completed. This is returned immediately for parameters that take longer to set, indicating that the the parameter was received and does not need to be resent."]
3798    PARAM_ACK_IN_PROGRESS = 3,
3799}
3800impl ParamAck {
3801    pub const DEFAULT: Self = Self::PARAM_ACK_ACCEPTED;
3802}
3803impl Default for ParamAck {
3804    fn default() -> Self {
3805        Self::DEFAULT
3806    }
3807}
3808bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 9 is set the floats afx afy afz should be interpreted as force instead of acceleration."] pub struct PositionTargetTypemask : u16 { # [doc = "Ignore position x"] const POSITION_TARGET_TYPEMASK_X_IGNORE = 1 ; # [doc = "Ignore position y"] const POSITION_TARGET_TYPEMASK_Y_IGNORE = 2 ; # [doc = "Ignore position z"] const POSITION_TARGET_TYPEMASK_Z_IGNORE = 4 ; # [doc = "Ignore velocity x"] const POSITION_TARGET_TYPEMASK_VX_IGNORE = 8 ; # [doc = "Ignore velocity y"] const POSITION_TARGET_TYPEMASK_VY_IGNORE = 16 ; # [doc = "Ignore velocity z"] const POSITION_TARGET_TYPEMASK_VZ_IGNORE = 32 ; # [doc = "Ignore acceleration x"] const POSITION_TARGET_TYPEMASK_AX_IGNORE = 64 ; # [doc = "Ignore acceleration y"] const POSITION_TARGET_TYPEMASK_AY_IGNORE = 128 ; # [doc = "Ignore acceleration z"] const POSITION_TARGET_TYPEMASK_AZ_IGNORE = 256 ; # [doc = "Use force instead of acceleration"] const POSITION_TARGET_TYPEMASK_FORCE_SET = 512 ; # [doc = "Ignore yaw"] const POSITION_TARGET_TYPEMASK_YAW_IGNORE = 1024 ; # [doc = "Ignore yaw rate"] const POSITION_TARGET_TYPEMASK_YAW_RATE_IGNORE = 2048 ; } }
3809impl PositionTargetTypemask {
3810    pub const DEFAULT: Self = Self::POSITION_TARGET_TYPEMASK_X_IGNORE;
3811}
3812impl Default for PositionTargetTypemask {
3813    fn default() -> Self {
3814        Self::DEFAULT
3815    }
3816}
3817#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3818#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3819#[cfg_attr(feature = "serde", serde(tag = "type"))]
3820#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3821#[repr(u32)]
3822#[doc = "Precision land modes (used in MAV_CMD_NAV_LAND)."]
3823pub enum PrecisionLandMode {
3824    #[doc = "Normal (non-precision) landing."]
3825    PRECISION_LAND_MODE_DISABLED = 0,
3826    #[doc = "Use precision landing if beacon detected when land command accepted, otherwise land normally."]
3827    PRECISION_LAND_MODE_OPPORTUNISTIC = 1,
3828    #[doc = "Use precision landing, searching for beacon if not found when land command accepted (land normally if beacon cannot be found)."]
3829    PRECISION_LAND_MODE_REQUIRED = 2,
3830}
3831impl PrecisionLandMode {
3832    pub const DEFAULT: Self = Self::PRECISION_LAND_MODE_DISABLED;
3833}
3834impl Default for PrecisionLandMode {
3835    fn default() -> Self {
3836        Self::DEFAULT
3837    }
3838}
3839#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3840#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3841#[cfg_attr(feature = "serde", serde(tag = "type"))]
3842#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3843#[repr(u32)]
3844#[doc = "Actions for reading and writing plan information (mission, rally points, geofence) between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly missions are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
3845pub enum PreflightStorageMissionAction {
3846    #[doc = "Read current mission data from persistent storage"]
3847    MISSION_READ_PERSISTENT = 0,
3848    #[doc = "Write current mission data to persistent storage"]
3849    MISSION_WRITE_PERSISTENT = 1,
3850    #[doc = "Erase all mission data stored on the vehicle (both persistent and volatile storage)"]
3851    MISSION_RESET_DEFAULT = 2,
3852}
3853impl PreflightStorageMissionAction {
3854    pub const DEFAULT: Self = Self::MISSION_READ_PERSISTENT;
3855}
3856impl Default for PreflightStorageMissionAction {
3857    fn default() -> Self {
3858        Self::DEFAULT
3859    }
3860}
3861#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3862#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3863#[cfg_attr(feature = "serde", serde(tag = "type"))]
3864#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3865#[repr(u32)]
3866#[doc = "Actions for reading/writing parameters between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly parameters are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
3867pub enum PreflightStorageParameterAction {
3868    #[doc = "Read all parameters from persistent storage. Replaces values in volatile storage."]
3869    PARAM_READ_PERSISTENT = 0,
3870    #[doc = "Write all parameter values to persistent storage (flash/EEPROM)"]
3871    PARAM_WRITE_PERSISTENT = 1,
3872    #[doc = "Reset all user configurable parameters to their default value (including airframe selection, sensor calibration data, safety settings, and so on). Does not reset values that contain operation counters and vehicle computed statistics."]
3873    PARAM_RESET_CONFIG_DEFAULT = 2,
3874    #[doc = "Reset only sensor calibration parameters to factory defaults (or firmware default if not available)"]
3875    PARAM_RESET_SENSOR_DEFAULT = 3,
3876    #[doc = "Reset all parameters, including operation counters, to default values"]
3877    PARAM_RESET_ALL_DEFAULT = 4,
3878}
3879impl PreflightStorageParameterAction {
3880    pub const DEFAULT: Self = Self::PARAM_READ_PERSISTENT;
3881}
3882impl Default for PreflightStorageParameterAction {
3883    fn default() -> Self {
3884        Self::DEFAULT
3885    }
3886}
3887#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3888#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3889#[cfg_attr(feature = "serde", serde(tag = "type"))]
3890#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3891#[repr(u32)]
3892#[doc = "RC sub-type of types defined in RC_TYPE. Used in MAV_CMD_START_RX_PAIR. Ignored if value does not correspond to the set RC_TYPE."]
3893pub enum RcSubType {
3894    #[doc = "Spektrum DSM2"]
3895    RC_SUB_TYPE_SPEKTRUM_DSM2 = 0,
3896    #[doc = "Spektrum DSMX"]
3897    RC_SUB_TYPE_SPEKTRUM_DSMX = 1,
3898    #[doc = "Spektrum DSMX8"]
3899    RC_SUB_TYPE_SPEKTRUM_DSMX8 = 2,
3900}
3901impl RcSubType {
3902    pub const DEFAULT: Self = Self::RC_SUB_TYPE_SPEKTRUM_DSM2;
3903}
3904impl Default for RcSubType {
3905    fn default() -> Self {
3906        Self::DEFAULT
3907    }
3908}
3909#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3910#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3911#[cfg_attr(feature = "serde", serde(tag = "type"))]
3912#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3913#[repr(u32)]
3914#[doc = "RC type. Used in MAV_CMD_START_RX_PAIR."]
3915pub enum RcType {
3916    #[doc = "Spektrum"]
3917    RC_TYPE_SPEKTRUM = 0,
3918    #[doc = "CRSF"]
3919    RC_TYPE_CRSF = 1,
3920}
3921impl RcType {
3922    pub const DEFAULT: Self = Self::RC_TYPE_SPEKTRUM;
3923}
3924impl Default for RcType {
3925    fn default() -> Self {
3926        Self::DEFAULT
3927    }
3928}
3929#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3930#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3931#[cfg_attr(feature = "serde", serde(tag = "type"))]
3932#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3933#[repr(u32)]
3934#[doc = "Specifies the conditions under which the MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN command should be accepted."]
3935pub enum RebootShutdownConditions {
3936    #[doc = "Reboot/Shutdown only if allowed by safety checks, such as being landed."]
3937    REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED = 0,
3938    #[doc = "Force reboot/shutdown of the autopilot/component regardless of system state."]
3939    REBOOT_SHUTDOWN_CONDITIONS_FORCE = 20190226,
3940}
3941impl RebootShutdownConditions {
3942    pub const DEFAULT: Self = Self::REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED;
3943}
3944impl Default for RebootShutdownConditions {
3945    fn default() -> Self {
3946        Self::DEFAULT
3947    }
3948}
3949#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3950#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3951#[cfg_attr(feature = "serde", serde(tag = "type"))]
3952#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3953#[repr(u32)]
3954#[doc = "RTK GPS baseline coordinate system, used for RTK corrections"]
3955pub enum RtkBaselineCoordinateSystem {
3956    #[doc = "Earth-centered, Earth-fixed"]
3957    RTK_BASELINE_COORDINATE_SYSTEM_ECEF = 0,
3958    #[doc = "RTK basestation centered, north, east, down"]
3959    RTK_BASELINE_COORDINATE_SYSTEM_NED = 1,
3960}
3961impl RtkBaselineCoordinateSystem {
3962    pub const DEFAULT: Self = Self::RTK_BASELINE_COORDINATE_SYSTEM_ECEF;
3963}
3964impl Default for RtkBaselineCoordinateSystem {
3965    fn default() -> Self {
3966        Self::DEFAULT
3967    }
3968}
3969#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3970#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3971#[cfg_attr(feature = "serde", serde(tag = "type"))]
3972#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3973#[repr(u32)]
3974#[doc = "Possible safety switch states."]
3975pub enum SafetySwitchState {
3976    #[doc = "Safety switch is engaged and vehicle should be safe to approach."]
3977    SAFETY_SWITCH_STATE_SAFE = 0,
3978    #[doc = "Safety switch is NOT engaged and motors, propellers and other actuators should be considered active."]
3979    SAFETY_SWITCH_STATE_DANGEROUS = 1,
3980}
3981impl SafetySwitchState {
3982    pub const DEFAULT: Self = Self::SAFETY_SWITCH_STATE_SAFE;
3983}
3984impl Default for SafetySwitchState {
3985    fn default() -> Self {
3986        Self::DEFAULT
3987    }
3988}
3989#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3990#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3991#[cfg_attr(feature = "serde", serde(tag = "type"))]
3992#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3993#[repr(u32)]
3994#[doc = "SERIAL_CONTROL device types"]
3995pub enum SerialControlDev {
3996    #[doc = "First telemetry port"]
3997    SERIAL_CONTROL_DEV_TELEM1 = 0,
3998    #[doc = "Second telemetry port"]
3999    SERIAL_CONTROL_DEV_TELEM2 = 1,
4000    #[doc = "First GPS port"]
4001    SERIAL_CONTROL_DEV_GPS1 = 2,
4002    #[doc = "Second GPS port"]
4003    SERIAL_CONTROL_DEV_GPS2 = 3,
4004    #[doc = "system shell"]
4005    SERIAL_CONTROL_DEV_SHELL = 10,
4006    #[doc = "SERIAL0"]
4007    SERIAL_CONTROL_SERIAL0 = 100,
4008    #[doc = "SERIAL1"]
4009    SERIAL_CONTROL_SERIAL1 = 101,
4010    #[doc = "SERIAL2"]
4011    SERIAL_CONTROL_SERIAL2 = 102,
4012    #[doc = "SERIAL3"]
4013    SERIAL_CONTROL_SERIAL3 = 103,
4014    #[doc = "SERIAL4"]
4015    SERIAL_CONTROL_SERIAL4 = 104,
4016    #[doc = "SERIAL5"]
4017    SERIAL_CONTROL_SERIAL5 = 105,
4018    #[doc = "SERIAL6"]
4019    SERIAL_CONTROL_SERIAL6 = 106,
4020    #[doc = "SERIAL7"]
4021    SERIAL_CONTROL_SERIAL7 = 107,
4022    #[doc = "SERIAL8"]
4023    SERIAL_CONTROL_SERIAL8 = 108,
4024    #[doc = "SERIAL9"]
4025    SERIAL_CONTROL_SERIAL9 = 109,
4026}
4027impl SerialControlDev {
4028    pub const DEFAULT: Self = Self::SERIAL_CONTROL_DEV_TELEM1;
4029}
4030impl Default for SerialControlDev {
4031    fn default() -> Self {
4032        Self::DEFAULT
4033    }
4034}
4035bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "SERIAL_CONTROL flags (bitmask)"] pub struct SerialControlFlag : u8 { # [doc = "Set if this is a reply"] const SERIAL_CONTROL_FLAG_REPLY = 1 ; # [doc = "Set if the sender wants the receiver to send a response as another SERIAL_CONTROL message"] const SERIAL_CONTROL_FLAG_RESPOND = 2 ; # [doc = "Set if access to the serial port should be removed from whatever driver is currently using it, giving exclusive access to the SERIAL_CONTROL protocol. The port can be handed back by sending a request without this flag set"] const SERIAL_CONTROL_FLAG_EXCLUSIVE = 4 ; # [doc = "Block on writes to the serial port"] const SERIAL_CONTROL_FLAG_BLOCKING = 8 ; # [doc = "Send multiple replies until port is drained"] const SERIAL_CONTROL_FLAG_MULTI = 16 ; } }
4036impl SerialControlFlag {
4037    pub const DEFAULT: Self = Self::SERIAL_CONTROL_FLAG_REPLY;
4038}
4039impl Default for SerialControlFlag {
4040    fn default() -> Self {
4041        Self::DEFAULT
4042    }
4043}
4044#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4045#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4046#[cfg_attr(feature = "serde", serde(tag = "type"))]
4047#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4048#[repr(u32)]
4049#[doc = "Focus types for MAV_CMD_SET_CAMERA_FOCUS"]
4050pub enum SetFocusType {
4051    #[doc = "Focus one step increment (-1 for focusing in, 1 for focusing out towards infinity)."]
4052    FOCUS_TYPE_STEP = 0,
4053    #[doc = "Continuous normalized focus in/out rate until stopped. Range -1..1, negative: in, positive: out towards infinity, 0 to stop focusing. Other values should be clipped to the range."]
4054    FOCUS_TYPE_CONTINUOUS = 1,
4055    #[doc = "Focus value as proportion of full camera focus range (a value between 0.0 and 100.0)"]
4056    FOCUS_TYPE_RANGE = 2,
4057    #[doc = "Focus value in metres. Note that there is no message to get the valid focus range of the camera, so this can type can only be used for cameras where the range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)."]
4058    FOCUS_TYPE_METERS = 3,
4059    #[doc = "Focus automatically."]
4060    FOCUS_TYPE_AUTO = 4,
4061    #[doc = "Single auto focus. Mainly used for still pictures. Usually abbreviated as AF-S."]
4062    FOCUS_TYPE_AUTO_SINGLE = 5,
4063    #[doc = "Continuous auto focus. Mainly used for dynamic scenes. Abbreviated as AF-C."]
4064    FOCUS_TYPE_AUTO_CONTINUOUS = 6,
4065}
4066impl SetFocusType {
4067    pub const DEFAULT: Self = Self::FOCUS_TYPE_STEP;
4068}
4069impl Default for SetFocusType {
4070    fn default() -> Self {
4071        Self::DEFAULT
4072    }
4073}
4074#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4075#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4076#[cfg_attr(feature = "serde", serde(tag = "type"))]
4077#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4078#[repr(u32)]
4079#[doc = "Speed setpoint types used in MAV_CMD_DO_CHANGE_SPEED"]
4080pub enum SpeedType {
4081    #[doc = "Airspeed"]
4082    SPEED_TYPE_AIRSPEED = 0,
4083    #[doc = "Groundspeed"]
4084    SPEED_TYPE_GROUNDSPEED = 1,
4085    #[doc = "Climb speed"]
4086    SPEED_TYPE_CLIMB_SPEED = 2,
4087    #[doc = "Descent speed"]
4088    SPEED_TYPE_DESCENT_SPEED = 3,
4089}
4090impl SpeedType {
4091    pub const DEFAULT: Self = Self::SPEED_TYPE_AIRSPEED;
4092}
4093impl Default for SpeedType {
4094    fn default() -> Self {
4095        Self::DEFAULT
4096    }
4097}
4098#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4099#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4100#[cfg_attr(feature = "serde", serde(tag = "type"))]
4101#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4102#[repr(u32)]
4103#[doc = "Flags to indicate the status of camera storage."]
4104pub enum StorageStatus {
4105    #[doc = "Storage is missing (no microSD card loaded for example.)"]
4106    STORAGE_STATUS_EMPTY = 0,
4107    #[doc = "Storage present but unformatted."]
4108    STORAGE_STATUS_UNFORMATTED = 1,
4109    #[doc = "Storage present and ready."]
4110    STORAGE_STATUS_READY = 2,
4111    #[doc = "Camera does not supply storage status information. Capacity information in STORAGE_INFORMATION fields will be ignored."]
4112    STORAGE_STATUS_NOT_SUPPORTED = 3,
4113}
4114impl StorageStatus {
4115    pub const DEFAULT: Self = Self::STORAGE_STATUS_EMPTY;
4116}
4117impl Default for StorageStatus {
4118    fn default() -> Self {
4119        Self::DEFAULT
4120    }
4121}
4122#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4123#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4124#[cfg_attr(feature = "serde", serde(tag = "type"))]
4125#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4126#[repr(u32)]
4127#[doc = "Flags to indicate the type of storage."]
4128pub enum StorageType {
4129    #[doc = "Storage type is not known."]
4130    STORAGE_TYPE_UNKNOWN = 0,
4131    #[doc = "Storage type is USB device."]
4132    STORAGE_TYPE_USB_STICK = 1,
4133    #[doc = "Storage type is SD card."]
4134    STORAGE_TYPE_SD = 2,
4135    #[doc = "Storage type is microSD card."]
4136    STORAGE_TYPE_MICROSD = 3,
4137    #[doc = "Storage type is CFast."]
4138    STORAGE_TYPE_CF = 4,
4139    #[doc = "Storage type is CFexpress."]
4140    STORAGE_TYPE_CFE = 5,
4141    #[doc = "Storage type is XQD."]
4142    STORAGE_TYPE_XQD = 6,
4143    #[doc = "Storage type is HD mass storage type."]
4144    STORAGE_TYPE_HD = 7,
4145    #[doc = "Storage type is other, not listed type."]
4146    STORAGE_TYPE_OTHER = 254,
4147}
4148impl StorageType {
4149    pub const DEFAULT: Self = Self::STORAGE_TYPE_UNKNOWN;
4150}
4151impl Default for StorageType {
4152    fn default() -> Self {
4153        Self::DEFAULT
4154    }
4155}
4156bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to indicate usage for a particular storage (see STORAGE_INFORMATION.storage_usage and MAV_CMD_SET_STORAGE_USAGE)."] pub struct StorageUsageFlag : u8 { # [doc = "Always set to 1 (indicates STORAGE_INFORMATION.storage_usage is supported)."] const STORAGE_USAGE_FLAG_SET = 1 ; # [doc = "Storage for saving photos."] const STORAGE_USAGE_FLAG_PHOTO = 2 ; # [doc = "Storage for saving videos."] const STORAGE_USAGE_FLAG_VIDEO = 4 ; # [doc = "Storage for saving logs."] const STORAGE_USAGE_FLAG_LOGS = 8 ; } }
4157impl StorageUsageFlag {
4158    pub const DEFAULT: Self = Self::STORAGE_USAGE_FLAG_SET;
4159}
4160impl Default for StorageUsageFlag {
4161    fn default() -> Self {
4162        Self::DEFAULT
4163    }
4164}
4165#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4166#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4167#[cfg_attr(feature = "serde", serde(tag = "type"))]
4168#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4169#[repr(u32)]
4170#[doc = "Tune formats (used for vehicle buzzer/tone generation)."]
4171pub enum TuneFormat {
4172    #[doc = "Format is QBasic 1.1 Play: <https://www.qbasic.net/en/reference/qb11/Statement/PLAY-006.htm>."]
4173    TUNE_FORMAT_QBASIC1_1 = 1,
4174    #[doc = "Format is Modern Music Markup Language (MML): <https://en.wikipedia.org/wiki/Music_Macro_Language#Modern_MML>."]
4175    TUNE_FORMAT_MML_MODERN = 2,
4176}
4177impl TuneFormat {
4178    pub const DEFAULT: Self = Self::TUNE_FORMAT_QBASIC1_1;
4179}
4180impl Default for TuneFormat {
4181    fn default() -> Self {
4182        Self::DEFAULT
4183    }
4184}
4185#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4186#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4187#[cfg_attr(feature = "serde", serde(tag = "type"))]
4188#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4189#[repr(u32)]
4190#[doc = "Generalized UAVCAN node health"]
4191pub enum UavcanNodeHealth {
4192    #[doc = "The node is functioning properly."]
4193    UAVCAN_NODE_HEALTH_OK = 0,
4194    #[doc = "A critical parameter went out of range or the node has encountered a minor failure."]
4195    UAVCAN_NODE_HEALTH_WARNING = 1,
4196    #[doc = "The node has encountered a major failure."]
4197    UAVCAN_NODE_HEALTH_ERROR = 2,
4198    #[doc = "The node has suffered a fatal malfunction."]
4199    UAVCAN_NODE_HEALTH_CRITICAL = 3,
4200}
4201impl UavcanNodeHealth {
4202    pub const DEFAULT: Self = Self::UAVCAN_NODE_HEALTH_OK;
4203}
4204impl Default for UavcanNodeHealth {
4205    fn default() -> Self {
4206        Self::DEFAULT
4207    }
4208}
4209#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4210#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4211#[cfg_attr(feature = "serde", serde(tag = "type"))]
4212#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4213#[repr(u32)]
4214#[doc = "Generalized UAVCAN node mode"]
4215pub enum UavcanNodeMode {
4216    #[doc = "The node is performing its primary functions."]
4217    UAVCAN_NODE_MODE_OPERATIONAL = 0,
4218    #[doc = "The node is initializing; this mode is entered immediately after startup."]
4219    UAVCAN_NODE_MODE_INITIALIZATION = 1,
4220    #[doc = "The node is under maintenance."]
4221    UAVCAN_NODE_MODE_MAINTENANCE = 2,
4222    #[doc = "The node is in the process of updating its software."]
4223    UAVCAN_NODE_MODE_SOFTWARE_UPDATE = 3,
4224    #[doc = "The node is no longer available online."]
4225    UAVCAN_NODE_MODE_OFFLINE = 7,
4226}
4227impl UavcanNodeMode {
4228    pub const DEFAULT: Self = Self::UAVCAN_NODE_MODE_OPERATIONAL;
4229}
4230impl Default for UavcanNodeMode {
4231    fn default() -> Self {
4232        Self::DEFAULT
4233    }
4234}
4235#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4236#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4237#[cfg_attr(feature = "serde", serde(tag = "type"))]
4238#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4239#[repr(u32)]
4240#[doc = "Emergency status encoding"]
4241pub enum UavionixAdsbEmergencyStatus {
4242    UAVIONIX_ADSB_OUT_NO_EMERGENCY = 0,
4243    UAVIONIX_ADSB_OUT_GENERAL_EMERGENCY = 1,
4244    UAVIONIX_ADSB_OUT_LIFEGUARD_EMERGENCY = 2,
4245    UAVIONIX_ADSB_OUT_MINIMUM_FUEL_EMERGENCY = 3,
4246    UAVIONIX_ADSB_OUT_NO_COMM_EMERGENCY = 4,
4247    UAVIONIX_ADSB_OUT_UNLAWFUL_INTERFERANCE_EMERGENCY = 5,
4248    UAVIONIX_ADSB_OUT_DOWNED_AIRCRAFT_EMERGENCY = 6,
4249    UAVIONIX_ADSB_OUT_RESERVED = 7,
4250}
4251impl UavionixAdsbEmergencyStatus {
4252    pub const DEFAULT: Self = Self::UAVIONIX_ADSB_OUT_NO_EMERGENCY;
4253}
4254impl Default for UavionixAdsbEmergencyStatus {
4255    fn default() -> Self {
4256        Self::DEFAULT
4257    }
4258}
4259#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4260#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4261#[cfg_attr(feature = "serde", serde(tag = "type"))]
4262#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4263#[repr(u32)]
4264#[doc = "Definitions for aircraft size"]
4265pub enum UavionixAdsbOutCfgAircraftSize {
4266    UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_NO_DATA = 0,
4267    UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L15M_W23M = 1,
4268    UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L25M_W28P5M = 2,
4269    UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L25_34M = 3,
4270    UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L35_33M = 4,
4271    UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L35_38M = 5,
4272    UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L45_39P5M = 6,
4273    UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L45_45M = 7,
4274    UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L55_45M = 8,
4275    UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L55_52M = 9,
4276    UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L65_59P5M = 10,
4277    UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L65_67M = 11,
4278    UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L75_W72P5M = 12,
4279    UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L75_W80M = 13,
4280    UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L85_W80M = 14,
4281    UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L85_W90M = 15,
4282}
4283impl UavionixAdsbOutCfgAircraftSize {
4284    pub const DEFAULT: Self = Self::UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_NO_DATA;
4285}
4286impl Default for UavionixAdsbOutCfgAircraftSize {
4287    fn default() -> Self {
4288        Self::DEFAULT
4289    }
4290}
4291#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4292#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4293#[cfg_attr(feature = "serde", serde(tag = "type"))]
4294#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4295#[repr(u32)]
4296#[doc = "GPS lataral offset encoding"]
4297pub enum UavionixAdsbOutCfgGpsOffsetLat {
4298    UAVIONIX_ADSB_OUT_CFG_GPS_OFFSET_LAT_NO_DATA = 0,
4299    UAVIONIX_ADSB_OUT_CFG_GPS_OFFSET_LAT_LEFT_2M = 1,
4300    UAVIONIX_ADSB_OUT_CFG_GPS_OFFSET_LAT_LEFT_4M = 2,
4301    UAVIONIX_ADSB_OUT_CFG_GPS_OFFSET_LAT_LEFT_6M = 3,
4302    UAVIONIX_ADSB_OUT_CFG_GPS_OFFSET_LAT_RIGHT_0M = 4,
4303    UAVIONIX_ADSB_OUT_CFG_GPS_OFFSET_LAT_RIGHT_2M = 5,
4304    UAVIONIX_ADSB_OUT_CFG_GPS_OFFSET_LAT_RIGHT_4M = 6,
4305    UAVIONIX_ADSB_OUT_CFG_GPS_OFFSET_LAT_RIGHT_6M = 7,
4306}
4307impl UavionixAdsbOutCfgGpsOffsetLat {
4308    pub const DEFAULT: Self = Self::UAVIONIX_ADSB_OUT_CFG_GPS_OFFSET_LAT_NO_DATA;
4309}
4310impl Default for UavionixAdsbOutCfgGpsOffsetLat {
4311    fn default() -> Self {
4312        Self::DEFAULT
4313    }
4314}
4315#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4316#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4317#[cfg_attr(feature = "serde", serde(tag = "type"))]
4318#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4319#[repr(u32)]
4320#[doc = "GPS longitudinal offset encoding"]
4321pub enum UavionixAdsbOutCfgGpsOffsetLon {
4322    UAVIONIX_ADSB_OUT_CFG_GPS_OFFSET_LON_NO_DATA = 0,
4323    UAVIONIX_ADSB_OUT_CFG_GPS_OFFSET_LON_APPLIED_BY_SENSOR = 1,
4324}
4325impl UavionixAdsbOutCfgGpsOffsetLon {
4326    pub const DEFAULT: Self = Self::UAVIONIX_ADSB_OUT_CFG_GPS_OFFSET_LON_NO_DATA;
4327}
4328impl Default for UavionixAdsbOutCfgGpsOffsetLon {
4329    fn default() -> Self {
4330        Self::DEFAULT
4331    }
4332}
4333bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "State flags for ADS-B transponder dynamic report"] pub struct UavionixAdsbOutControlState : u8 { const UAVIONIX_ADSB_OUT_CONTROL_STATE_EXTERNAL_BARO_CROSSCHECKED = 1 ; const UAVIONIX_ADSB_OUT_CONTROL_STATE_ON_GROUND = 4 ; const UAVIONIX_ADSB_OUT_CONTROL_STATE_IDENT_BUTTON_ACTIVE = 8 ; const UAVIONIX_ADSB_OUT_CONTROL_STATE_MODE_A_ENABLED = 16 ; const UAVIONIX_ADSB_OUT_CONTROL_STATE_MODE_C_ENABLED = 32 ; const UAVIONIX_ADSB_OUT_CONTROL_STATE_MODE_S_ENABLED = 64 ; const UAVIONIX_ADSB_OUT_CONTROL_STATE_1090ES_TX_ENABLED = 128 ; } }
4334impl UavionixAdsbOutControlState {
4335    pub const DEFAULT: Self = Self::UAVIONIX_ADSB_OUT_CONTROL_STATE_EXTERNAL_BARO_CROSSCHECKED;
4336}
4337impl Default for UavionixAdsbOutControlState {
4338    fn default() -> Self {
4339        Self::DEFAULT
4340    }
4341}
4342#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4343#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4344#[cfg_attr(feature = "serde", serde(tag = "type"))]
4345#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4346#[repr(u32)]
4347#[doc = "Status for ADS-B transponder dynamic input"]
4348pub enum UavionixAdsbOutDynamicGpsFix {
4349    UAVIONIX_ADSB_OUT_DYNAMIC_GPS_FIX_NONE_0 = 0,
4350    UAVIONIX_ADSB_OUT_DYNAMIC_GPS_FIX_NONE_1 = 1,
4351    UAVIONIX_ADSB_OUT_DYNAMIC_GPS_FIX_2D = 2,
4352    UAVIONIX_ADSB_OUT_DYNAMIC_GPS_FIX_3D = 3,
4353    UAVIONIX_ADSB_OUT_DYNAMIC_GPS_FIX_DGPS = 4,
4354    UAVIONIX_ADSB_OUT_DYNAMIC_GPS_FIX_RTK = 5,
4355}
4356impl UavionixAdsbOutDynamicGpsFix {
4357    pub const DEFAULT: Self = Self::UAVIONIX_ADSB_OUT_DYNAMIC_GPS_FIX_NONE_0;
4358}
4359impl Default for UavionixAdsbOutDynamicGpsFix {
4360    fn default() -> Self {
4361        Self::DEFAULT
4362    }
4363}
4364bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "State flags for ADS-B transponder dynamic report"] pub struct UavionixAdsbOutDynamicState : u16 { const UAVIONIX_ADSB_OUT_DYNAMIC_STATE_INTENT_CHANGE = 1 ; const UAVIONIX_ADSB_OUT_DYNAMIC_STATE_AUTOPILOT_ENABLED = 2 ; const UAVIONIX_ADSB_OUT_DYNAMIC_STATE_NICBARO_CROSSCHECKED = 4 ; const UAVIONIX_ADSB_OUT_DYNAMIC_STATE_ON_GROUND = 8 ; const UAVIONIX_ADSB_OUT_DYNAMIC_STATE_IDENT = 16 ; } }
4365impl UavionixAdsbOutDynamicState {
4366    pub const DEFAULT: Self = Self::UAVIONIX_ADSB_OUT_DYNAMIC_STATE_INTENT_CHANGE;
4367}
4368impl Default for UavionixAdsbOutDynamicState {
4369    fn default() -> Self {
4370        Self::DEFAULT
4371    }
4372}
4373bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Transceiver RF control flags for ADS-B transponder dynamic reports"] pub struct UavionixAdsbOutRfSelect : u8 { const UAVIONIX_ADSB_OUT_RF_SELECT_RX_ENABLED = 1 ; const UAVIONIX_ADSB_OUT_RF_SELECT_TX_ENABLED = 2 ; } }
4374impl UavionixAdsbOutRfSelect {
4375    pub const DEFAULT: Self = Self::UAVIONIX_ADSB_OUT_RF_SELECT_RX_ENABLED;
4376}
4377impl Default for UavionixAdsbOutRfSelect {
4378    fn default() -> Self {
4379        Self::DEFAULT
4380    }
4381}
4382bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "State flags for ADS-B transponder fault report"] pub struct UavionixAdsbOutStatusFault : u8 { const UAVIONIX_ADSB_OUT_STATUS_FAULT_STATUS_MESSAGE_UNAVAIL = 8 ; const UAVIONIX_ADSB_OUT_STATUS_FAULT_GPS_NO_POS = 16 ; const UAVIONIX_ADSB_OUT_STATUS_FAULT_GPS_UNAVAIL = 32 ; const UAVIONIX_ADSB_OUT_STATUS_FAULT_TX_SYSTEM_FAIL = 64 ; const UAVIONIX_ADSB_OUT_STATUS_FAULT_MAINT_REQ = 128 ; } }
4383impl UavionixAdsbOutStatusFault {
4384    pub const DEFAULT: Self = Self::UAVIONIX_ADSB_OUT_STATUS_FAULT_STATUS_MESSAGE_UNAVAIL;
4385}
4386impl Default for UavionixAdsbOutStatusFault {
4387    fn default() -> Self {
4388        Self::DEFAULT
4389    }
4390}
4391#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4392#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4393#[cfg_attr(feature = "serde", serde(tag = "type"))]
4394#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4395#[repr(u32)]
4396#[doc = "State flags for ADS-B transponder status report"]
4397pub enum UavionixAdsbOutStatusNicNacp {
4398    UAVIONIX_ADSB_NIC_CR_20_NM = 1,
4399    UAVIONIX_ADSB_NIC_CR_8_NM = 2,
4400    UAVIONIX_ADSB_NIC_CR_4_NM = 3,
4401    UAVIONIX_ADSB_NIC_CR_2_NM = 4,
4402    UAVIONIX_ADSB_NIC_CR_1_NM = 5,
4403    UAVIONIX_ADSB_NIC_CR_0_3_NM = 6,
4404    UAVIONIX_ADSB_NIC_CR_0_2_NM = 7,
4405    UAVIONIX_ADSB_NIC_CR_0_1_NM = 8,
4406    UAVIONIX_ADSB_NIC_CR_75_M = 9,
4407    UAVIONIX_ADSB_NIC_CR_25_M = 10,
4408    UAVIONIX_ADSB_NIC_CR_7_5_M = 11,
4409    UAVIONIX_ADSB_NACP_EPU_10_NM = 16,
4410    UAVIONIX_ADSB_NACP_EPU_4_NM = 32,
4411    UAVIONIX_ADSB_NACP_EPU_2_NM = 48,
4412    UAVIONIX_ADSB_NACP_EPU_1_NM = 64,
4413    UAVIONIX_ADSB_NACP_EPU_0_5_NM = 80,
4414    UAVIONIX_ADSB_NACP_EPU_0_3_NM = 96,
4415    UAVIONIX_ADSB_NACP_EPU_0_1_NM = 112,
4416    UAVIONIX_ADSB_NACP_EPU_0_05_NM = 128,
4417    UAVIONIX_ADSB_NACP_EPU_30_M = 144,
4418    UAVIONIX_ADSB_NACP_EPU_10_M = 160,
4419    UAVIONIX_ADSB_NACP_EPU_3_M = 176,
4420}
4421impl UavionixAdsbOutStatusNicNacp {
4422    pub const DEFAULT: Self = Self::UAVIONIX_ADSB_NIC_CR_20_NM;
4423}
4424impl Default for UavionixAdsbOutStatusNicNacp {
4425    fn default() -> Self {
4426        Self::DEFAULT
4427    }
4428}
4429bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "State flags for ADS-B transponder status report"] pub struct UavionixAdsbOutStatusState : u8 { const UAVIONIX_ADSB_OUT_STATUS_STATE_ON_GROUND = 1 ; const UAVIONIX_ADSB_OUT_STATUS_STATE_INTERROGATED_SINCE_LAST = 2 ; const UAVIONIX_ADSB_OUT_STATUS_STATE_XBIT_ENABLED = 4 ; const UAVIONIX_ADSB_OUT_STATUS_STATE_IDENT_ACTIVE = 8 ; const UAVIONIX_ADSB_OUT_STATUS_STATE_MODE_A_ENABLED = 16 ; const UAVIONIX_ADSB_OUT_STATUS_STATE_MODE_C_ENABLED = 32 ; const UAVIONIX_ADSB_OUT_STATUS_STATE_MODE_S_ENABLED = 64 ; const UAVIONIX_ADSB_OUT_STATUS_STATE_1090ES_TX_ENABLED = 128 ; } }
4430impl UavionixAdsbOutStatusState {
4431    pub const DEFAULT: Self = Self::UAVIONIX_ADSB_OUT_STATUS_STATE_ON_GROUND;
4432}
4433impl Default for UavionixAdsbOutStatusState {
4434    fn default() -> Self {
4435        Self::DEFAULT
4436    }
4437}
4438bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Status flags for ADS-B transponder dynamic output"] pub struct UavionixAdsbRfHealth : u8 { const UAVIONIX_ADSB_RF_HEALTH_OK = 1 ; const UAVIONIX_ADSB_RF_HEALTH_FAIL_TX = 2 ; const UAVIONIX_ADSB_RF_HEALTH_FAIL_RX = 16 ; } }
4439impl UavionixAdsbRfHealth {
4440    pub const DEFAULT: Self = Self::UAVIONIX_ADSB_RF_HEALTH_OK;
4441}
4442impl Default for UavionixAdsbRfHealth {
4443    fn default() -> Self {
4444        Self::DEFAULT
4445    }
4446}
4447bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "State flags for X-Bit and reserved fields."] pub struct UavionixAdsbXbit : u8 { const UAVIONIX_ADSB_XBIT_ENABLED = 128 ; } }
4448impl UavionixAdsbXbit {
4449    pub const DEFAULT: Self = Self::UAVIONIX_ADSB_XBIT_ENABLED;
4450}
4451impl Default for UavionixAdsbXbit {
4452    fn default() -> Self {
4453        Self::DEFAULT
4454    }
4455}
4456bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for the global position report."] pub struct UtmDataAvailFlags : u8 { # [doc = "The field time contains valid data."] const UTM_DATA_AVAIL_FLAGS_TIME_VALID = 1 ; # [doc = "The field uas_id contains valid data."] const UTM_DATA_AVAIL_FLAGS_UAS_ID_AVAILABLE = 2 ; # [doc = "The fields lat, lon and h_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_POSITION_AVAILABLE = 4 ; # [doc = "The fields alt and v_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_ALTITUDE_AVAILABLE = 8 ; # [doc = "The field relative_alt contains valid data."] const UTM_DATA_AVAIL_FLAGS_RELATIVE_ALTITUDE_AVAILABLE = 16 ; # [doc = "The fields vx and vy contain valid data."] const UTM_DATA_AVAIL_FLAGS_HORIZONTAL_VELO_AVAILABLE = 32 ; # [doc = "The field vz contains valid data."] const UTM_DATA_AVAIL_FLAGS_VERTICAL_VELO_AVAILABLE = 64 ; # [doc = "The fields next_lat, next_lon and next_alt contain valid data."] const UTM_DATA_AVAIL_FLAGS_NEXT_WAYPOINT_AVAILABLE = 128 ; } }
4457impl UtmDataAvailFlags {
4458    pub const DEFAULT: Self = Self::UTM_DATA_AVAIL_FLAGS_TIME_VALID;
4459}
4460impl Default for UtmDataAvailFlags {
4461    fn default() -> Self {
4462        Self::DEFAULT
4463    }
4464}
4465#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4466#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4467#[cfg_attr(feature = "serde", serde(tag = "type"))]
4468#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4469#[repr(u32)]
4470#[doc = "Airborne status of UAS."]
4471pub enum UtmFlightState {
4472    #[doc = "The flight state can't be determined."]
4473    UTM_FLIGHT_STATE_UNKNOWN = 1,
4474    #[doc = "UAS on ground."]
4475    UTM_FLIGHT_STATE_GROUND = 2,
4476    #[doc = "UAS airborne."]
4477    UTM_FLIGHT_STATE_AIRBORNE = 3,
4478    #[doc = "UAS is in an emergency flight state."]
4479    UTM_FLIGHT_STATE_EMERGENCY = 16,
4480    #[doc = "UAS has no active controls."]
4481    UTM_FLIGHT_STATE_NOCTRL = 32,
4482}
4483impl UtmFlightState {
4484    pub const DEFAULT: Self = Self::UTM_FLIGHT_STATE_UNKNOWN;
4485}
4486impl Default for UtmFlightState {
4487    fn default() -> Self {
4488        Self::DEFAULT
4489    }
4490}
4491#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4492#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4493#[cfg_attr(feature = "serde", serde(tag = "type"))]
4494#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4495#[repr(u32)]
4496#[doc = "Video stream encodings"]
4497pub enum VideoStreamEncoding {
4498    #[doc = "Stream encoding is unknown"]
4499    VIDEO_STREAM_ENCODING_UNKNOWN = 0,
4500    #[doc = "Stream encoding is H.264"]
4501    VIDEO_STREAM_ENCODING_H264 = 1,
4502    #[doc = "Stream encoding is H.265"]
4503    VIDEO_STREAM_ENCODING_H265 = 2,
4504}
4505impl VideoStreamEncoding {
4506    pub const DEFAULT: Self = Self::VIDEO_STREAM_ENCODING_UNKNOWN;
4507}
4508impl Default for VideoStreamEncoding {
4509    fn default() -> Self {
4510        Self::DEFAULT
4511    }
4512}
4513bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Stream status flags (Bitmap)"] pub struct VideoStreamStatusFlags : u16 { # [doc = "Stream is active (running)"] const VIDEO_STREAM_STATUS_FLAGS_RUNNING = 1 ; # [doc = "Stream is thermal imaging"] const VIDEO_STREAM_STATUS_FLAGS_THERMAL = 2 ; # [doc = "Stream can report absolute thermal range (see CAMERA_THERMAL_RANGE)."] const VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED = 4 ; } }
4514impl VideoStreamStatusFlags {
4515    pub const DEFAULT: Self = Self::VIDEO_STREAM_STATUS_FLAGS_RUNNING;
4516}
4517impl Default for VideoStreamStatusFlags {
4518    fn default() -> Self {
4519        Self::DEFAULT
4520    }
4521}
4522#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4523#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4524#[cfg_attr(feature = "serde", serde(tag = "type"))]
4525#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4526#[repr(u32)]
4527#[doc = "Video stream types"]
4528pub enum VideoStreamType {
4529    #[doc = "Stream is RTSP"]
4530    VIDEO_STREAM_TYPE_RTSP = 0,
4531    #[doc = "Stream is RTP UDP (URI gives the port number)"]
4532    VIDEO_STREAM_TYPE_RTPUDP = 1,
4533    #[doc = "Stream is MPEG on TCP"]
4534    VIDEO_STREAM_TYPE_TCP_MPEG = 2,
4535    #[doc = "Stream is MPEG TS (URI gives the port number)"]
4536    VIDEO_STREAM_TYPE_MPEG_TS = 3,
4537}
4538impl VideoStreamType {
4539    pub const DEFAULT: Self = Self::VIDEO_STREAM_TYPE_RTSP;
4540}
4541impl Default for VideoStreamType {
4542    fn default() -> Self {
4543        Self::DEFAULT
4544    }
4545}
4546#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4547#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4548#[cfg_attr(feature = "serde", serde(tag = "type"))]
4549#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4550#[repr(u32)]
4551#[doc = "Direction of VTOL transition"]
4552pub enum VtolTransitionHeading {
4553    #[doc = "Respect the heading configuration of the vehicle."]
4554    VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT = 0,
4555    #[doc = "Use the heading pointing towards the next waypoint."]
4556    VTOL_TRANSITION_HEADING_NEXT_WAYPOINT = 1,
4557    #[doc = "Use the heading on takeoff (while sitting on the ground)."]
4558    VTOL_TRANSITION_HEADING_TAKEOFF = 2,
4559    #[doc = "Use the specified heading in parameter 4."]
4560    VTOL_TRANSITION_HEADING_SPECIFIED = 3,
4561    #[doc = "Use the current heading when reaching takeoff altitude (potentially facing the wind when weather-vaning is active)."]
4562    VTOL_TRANSITION_HEADING_ANY = 4,
4563}
4564impl VtolTransitionHeading {
4565    pub const DEFAULT: Self = Self::VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT;
4566}
4567impl Default for VtolTransitionHeading {
4568    fn default() -> Self {
4569        Self::DEFAULT
4570    }
4571}
4572#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4573#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4574#[cfg_attr(feature = "serde", serde(tag = "type"))]
4575#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4576#[repr(u32)]
4577#[doc = "WiFi Mode."]
4578pub enum WifiConfigApMode {
4579    #[doc = "WiFi mode is undefined."]
4580    WIFI_CONFIG_AP_MODE_UNDEFINED = 0,
4581    #[doc = "WiFi configured as an access point."]
4582    WIFI_CONFIG_AP_MODE_AP = 1,
4583    #[doc = "WiFi configured as a station connected to an existing local WiFi network."]
4584    WIFI_CONFIG_AP_MODE_STATION = 2,
4585    #[doc = "WiFi disabled."]
4586    WIFI_CONFIG_AP_MODE_DISABLED = 3,
4587}
4588impl WifiConfigApMode {
4589    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_MODE_UNDEFINED;
4590}
4591impl Default for WifiConfigApMode {
4592    fn default() -> Self {
4593        Self::DEFAULT
4594    }
4595}
4596#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4597#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4598#[cfg_attr(feature = "serde", serde(tag = "type"))]
4599#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4600#[repr(u32)]
4601#[doc = "Possible responses from a WIFI_CONFIG_AP message."]
4602pub enum WifiConfigApResponse {
4603    #[doc = "Undefined response. Likely an indicative of a system that doesn't support this request."]
4604    WIFI_CONFIG_AP_RESPONSE_UNDEFINED = 0,
4605    #[doc = "Changes accepted."]
4606    WIFI_CONFIG_AP_RESPONSE_ACCEPTED = 1,
4607    #[doc = "Changes rejected."]
4608    WIFI_CONFIG_AP_RESPONSE_REJECTED = 2,
4609    #[doc = "Invalid Mode."]
4610    WIFI_CONFIG_AP_RESPONSE_MODE_ERROR = 3,
4611    #[doc = "Invalid SSID."]
4612    WIFI_CONFIG_AP_RESPONSE_SSID_ERROR = 4,
4613    #[doc = "Invalid Password."]
4614    WIFI_CONFIG_AP_RESPONSE_PASSWORD_ERROR = 5,
4615}
4616impl WifiConfigApResponse {
4617    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_RESPONSE_UNDEFINED;
4618}
4619impl Default for WifiConfigApResponse {
4620    fn default() -> Self {
4621        Self::DEFAULT
4622    }
4623}
4624#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4625#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4626#[cfg_attr(feature = "serde", serde(tag = "type"))]
4627#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4628#[repr(u32)]
4629#[doc = "Winch actions."]
4630pub enum WinchActions {
4631    #[doc = "Allow motor to freewheel."]
4632    WINCH_RELAXED = 0,
4633    #[doc = "Wind or unwind specified length of line, optionally using specified rate."]
4634    WINCH_RELATIVE_LENGTH_CONTROL = 1,
4635    #[doc = "Wind or unwind line at specified rate."]
4636    WINCH_RATE_CONTROL = 2,
4637    #[doc = "Perform the locking sequence to relieve motor while in the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4638    WINCH_LOCK = 3,
4639    #[doc = "Sequence of drop, slow down, touch down, reel up, lock. Only action and instance command parameters are used, others are ignored."]
4640    WINCH_DELIVER = 4,
4641    #[doc = "Engage motor and hold current position. Only action and instance command parameters are used, others are ignored."]
4642    WINCH_HOLD = 5,
4643    #[doc = "Return the reel to the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4644    WINCH_RETRACT = 6,
4645    #[doc = "Load the reel with line. The winch will calculate the total loaded length and stop when the tension exceeds a threshold. Only action and instance command parameters are used, others are ignored."]
4646    WINCH_LOAD_LINE = 7,
4647    #[doc = "Spool out the entire length of the line. Only action and instance command parameters are used, others are ignored."]
4648    WINCH_ABANDON_LINE = 8,
4649    #[doc = "Spools out just enough to present the hook to the user to load the payload. Only action and instance command parameters are used, others are ignored"]
4650    WINCH_LOAD_PAYLOAD = 9,
4651}
4652impl WinchActions {
4653    pub const DEFAULT: Self = Self::WINCH_RELAXED;
4654}
4655impl Default for WinchActions {
4656    fn default() -> Self {
4657        Self::DEFAULT
4658    }
4659}
4660#[doc = "id: 140"]
4661#[doc = "Set the vehicle attitude and body angular rates."]
4662#[derive(Debug, Clone, PartialEq)]
4663#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4664#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4665pub struct ACTUATOR_CONTROL_TARGET_DATA {
4666    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
4667    pub time_usec: u64,
4668    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
4669    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4670    pub controls: [f32; 8],
4671    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
4672    pub group_mlx: u8,
4673}
4674impl ACTUATOR_CONTROL_TARGET_DATA {
4675    pub const ENCODED_LEN: usize = 41usize;
4676    pub const DEFAULT: Self = Self {
4677        time_usec: 0_u64,
4678        controls: [0.0_f32; 8usize],
4679        group_mlx: 0_u8,
4680    };
4681    #[cfg(feature = "arbitrary")]
4682    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4683        use arbitrary::{Arbitrary, Unstructured};
4684        let mut buf = [0u8; 1024];
4685        rng.fill_bytes(&mut buf);
4686        let mut unstructured = Unstructured::new(&buf);
4687        Self::arbitrary(&mut unstructured).unwrap_or_default()
4688    }
4689}
4690impl Default for ACTUATOR_CONTROL_TARGET_DATA {
4691    fn default() -> Self {
4692        Self::DEFAULT.clone()
4693    }
4694}
4695impl MessageData for ACTUATOR_CONTROL_TARGET_DATA {
4696    type Message = MavMessage;
4697    const ID: u32 = 140u32;
4698    const NAME: &'static str = "ACTUATOR_CONTROL_TARGET";
4699    const EXTRA_CRC: u8 = 181u8;
4700    const ENCODED_LEN: usize = 41usize;
4701    fn deser(
4702        _version: MavlinkVersion,
4703        __input: &[u8],
4704    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4705        let avail_len = __input.len();
4706        let mut payload_buf = [0; Self::ENCODED_LEN];
4707        let mut buf = if avail_len < Self::ENCODED_LEN {
4708            payload_buf[0..avail_len].copy_from_slice(__input);
4709            Bytes::new(&payload_buf)
4710        } else {
4711            Bytes::new(__input)
4712        };
4713        let mut __struct = Self::default();
4714        __struct.time_usec = buf.get_u64_le();
4715        for v in &mut __struct.controls {
4716            let val = buf.get_f32_le();
4717            *v = val;
4718        }
4719        __struct.group_mlx = buf.get_u8();
4720        Ok(__struct)
4721    }
4722    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4723        let mut __tmp = BytesMut::new(bytes);
4724        #[allow(clippy::absurd_extreme_comparisons)]
4725        #[allow(unused_comparisons)]
4726        if __tmp.remaining() < Self::ENCODED_LEN {
4727            panic!(
4728                "buffer is too small (need {} bytes, but got {})",
4729                Self::ENCODED_LEN,
4730                __tmp.remaining(),
4731            )
4732        }
4733        __tmp.put_u64_le(self.time_usec);
4734        for val in &self.controls {
4735            __tmp.put_f32_le(*val);
4736        }
4737        __tmp.put_u8(self.group_mlx);
4738        if matches!(version, MavlinkVersion::V2) {
4739            let len = __tmp.len();
4740            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4741        } else {
4742            __tmp.len()
4743        }
4744    }
4745}
4746#[doc = "id: 375"]
4747#[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
4748#[derive(Debug, Clone, PartialEq)]
4749#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4750#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4751pub struct ACTUATOR_OUTPUT_STATUS_DATA {
4752    #[doc = "Timestamp (since system boot)."]
4753    pub time_usec: u64,
4754    #[doc = "Active outputs"]
4755    pub active: u32,
4756    #[doc = "Servo / motor output array values. Zero values indicate unused channels."]
4757    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4758    pub actuator: [f32; 32],
4759}
4760impl ACTUATOR_OUTPUT_STATUS_DATA {
4761    pub const ENCODED_LEN: usize = 140usize;
4762    pub const DEFAULT: Self = Self {
4763        time_usec: 0_u64,
4764        active: 0_u32,
4765        actuator: [0.0_f32; 32usize],
4766    };
4767    #[cfg(feature = "arbitrary")]
4768    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4769        use arbitrary::{Arbitrary, Unstructured};
4770        let mut buf = [0u8; 1024];
4771        rng.fill_bytes(&mut buf);
4772        let mut unstructured = Unstructured::new(&buf);
4773        Self::arbitrary(&mut unstructured).unwrap_or_default()
4774    }
4775}
4776impl Default for ACTUATOR_OUTPUT_STATUS_DATA {
4777    fn default() -> Self {
4778        Self::DEFAULT.clone()
4779    }
4780}
4781impl MessageData for ACTUATOR_OUTPUT_STATUS_DATA {
4782    type Message = MavMessage;
4783    const ID: u32 = 375u32;
4784    const NAME: &'static str = "ACTUATOR_OUTPUT_STATUS";
4785    const EXTRA_CRC: u8 = 251u8;
4786    const ENCODED_LEN: usize = 140usize;
4787    fn deser(
4788        _version: MavlinkVersion,
4789        __input: &[u8],
4790    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4791        let avail_len = __input.len();
4792        let mut payload_buf = [0; Self::ENCODED_LEN];
4793        let mut buf = if avail_len < Self::ENCODED_LEN {
4794            payload_buf[0..avail_len].copy_from_slice(__input);
4795            Bytes::new(&payload_buf)
4796        } else {
4797            Bytes::new(__input)
4798        };
4799        let mut __struct = Self::default();
4800        __struct.time_usec = buf.get_u64_le();
4801        __struct.active = buf.get_u32_le();
4802        for v in &mut __struct.actuator {
4803            let val = buf.get_f32_le();
4804            *v = val;
4805        }
4806        Ok(__struct)
4807    }
4808    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4809        let mut __tmp = BytesMut::new(bytes);
4810        #[allow(clippy::absurd_extreme_comparisons)]
4811        #[allow(unused_comparisons)]
4812        if __tmp.remaining() < Self::ENCODED_LEN {
4813            panic!(
4814                "buffer is too small (need {} bytes, but got {})",
4815                Self::ENCODED_LEN,
4816                __tmp.remaining(),
4817            )
4818        }
4819        __tmp.put_u64_le(self.time_usec);
4820        __tmp.put_u32_le(self.active);
4821        for val in &self.actuator {
4822            __tmp.put_f32_le(*val);
4823        }
4824        if matches!(version, MavlinkVersion::V2) {
4825            let len = __tmp.len();
4826            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4827        } else {
4828            __tmp.len()
4829        }
4830    }
4831}
4832#[doc = "id: 246"]
4833#[doc = "The location and information of an ADSB vehicle."]
4834#[derive(Debug, Clone, PartialEq)]
4835#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4836#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4837pub struct ADSB_VEHICLE_DATA {
4838    #[doc = "ICAO address"]
4839    pub ICAO_address: u32,
4840    #[doc = "Latitude"]
4841    pub lat: i32,
4842    #[doc = "Longitude"]
4843    pub lon: i32,
4844    #[doc = "Altitude(ASL)"]
4845    pub altitude: i32,
4846    #[doc = "Course over ground"]
4847    pub heading: u16,
4848    #[doc = "The horizontal velocity"]
4849    pub hor_velocity: u16,
4850    #[doc = "The vertical velocity. Positive is up"]
4851    pub ver_velocity: i16,
4852    #[doc = "Bitmap to indicate various statuses including valid data fields"]
4853    pub flags: AdsbFlags,
4854    #[doc = "Squawk code. Note that the code is in decimal: e.g. 7700 (general emergency) is encoded as binary 0b0001_1110_0001_0100, not(!) as 0b0000_111_111_000_000"]
4855    pub squawk: u16,
4856    #[doc = "ADSB altitude type."]
4857    pub altitude_type: AdsbAltitudeType,
4858    #[doc = "The callsign, 8+null"]
4859    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4860    pub callsign: [u8; 9],
4861    #[doc = "ADSB emitter type."]
4862    pub emitter_type: AdsbEmitterType,
4863    #[doc = "Time since last communication in seconds"]
4864    pub tslc: u8,
4865}
4866impl ADSB_VEHICLE_DATA {
4867    pub const ENCODED_LEN: usize = 38usize;
4868    pub const DEFAULT: Self = Self {
4869        ICAO_address: 0_u32,
4870        lat: 0_i32,
4871        lon: 0_i32,
4872        altitude: 0_i32,
4873        heading: 0_u16,
4874        hor_velocity: 0_u16,
4875        ver_velocity: 0_i16,
4876        flags: AdsbFlags::DEFAULT,
4877        squawk: 0_u16,
4878        altitude_type: AdsbAltitudeType::DEFAULT,
4879        callsign: [0_u8; 9usize],
4880        emitter_type: AdsbEmitterType::DEFAULT,
4881        tslc: 0_u8,
4882    };
4883    #[cfg(feature = "arbitrary")]
4884    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4885        use arbitrary::{Arbitrary, Unstructured};
4886        let mut buf = [0u8; 1024];
4887        rng.fill_bytes(&mut buf);
4888        let mut unstructured = Unstructured::new(&buf);
4889        Self::arbitrary(&mut unstructured).unwrap_or_default()
4890    }
4891}
4892impl Default for ADSB_VEHICLE_DATA {
4893    fn default() -> Self {
4894        Self::DEFAULT.clone()
4895    }
4896}
4897impl MessageData for ADSB_VEHICLE_DATA {
4898    type Message = MavMessage;
4899    const ID: u32 = 246u32;
4900    const NAME: &'static str = "ADSB_VEHICLE";
4901    const EXTRA_CRC: u8 = 184u8;
4902    const ENCODED_LEN: usize = 38usize;
4903    fn deser(
4904        _version: MavlinkVersion,
4905        __input: &[u8],
4906    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4907        let avail_len = __input.len();
4908        let mut payload_buf = [0; Self::ENCODED_LEN];
4909        let mut buf = if avail_len < Self::ENCODED_LEN {
4910            payload_buf[0..avail_len].copy_from_slice(__input);
4911            Bytes::new(&payload_buf)
4912        } else {
4913            Bytes::new(__input)
4914        };
4915        let mut __struct = Self::default();
4916        __struct.ICAO_address = buf.get_u32_le();
4917        __struct.lat = buf.get_i32_le();
4918        __struct.lon = buf.get_i32_le();
4919        __struct.altitude = buf.get_i32_le();
4920        __struct.heading = buf.get_u16_le();
4921        __struct.hor_velocity = buf.get_u16_le();
4922        __struct.ver_velocity = buf.get_i16_le();
4923        let tmp = buf.get_u16_le();
4924        __struct.flags = AdsbFlags::from_bits(tmp & AdsbFlags::all().bits()).ok_or(
4925            ::mavlink_core::error::ParserError::InvalidFlag {
4926                flag_type: "AdsbFlags",
4927                value: tmp as u32,
4928            },
4929        )?;
4930        __struct.squawk = buf.get_u16_le();
4931        let tmp = buf.get_u8();
4932        __struct.altitude_type =
4933            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
4934                enum_type: "AdsbAltitudeType",
4935                value: tmp as u32,
4936            })?;
4937        for v in &mut __struct.callsign {
4938            let val = buf.get_u8();
4939            *v = val;
4940        }
4941        let tmp = buf.get_u8();
4942        __struct.emitter_type =
4943            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
4944                enum_type: "AdsbEmitterType",
4945                value: tmp as u32,
4946            })?;
4947        __struct.tslc = buf.get_u8();
4948        Ok(__struct)
4949    }
4950    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4951        let mut __tmp = BytesMut::new(bytes);
4952        #[allow(clippy::absurd_extreme_comparisons)]
4953        #[allow(unused_comparisons)]
4954        if __tmp.remaining() < Self::ENCODED_LEN {
4955            panic!(
4956                "buffer is too small (need {} bytes, but got {})",
4957                Self::ENCODED_LEN,
4958                __tmp.remaining(),
4959            )
4960        }
4961        __tmp.put_u32_le(self.ICAO_address);
4962        __tmp.put_i32_le(self.lat);
4963        __tmp.put_i32_le(self.lon);
4964        __tmp.put_i32_le(self.altitude);
4965        __tmp.put_u16_le(self.heading);
4966        __tmp.put_u16_le(self.hor_velocity);
4967        __tmp.put_i16_le(self.ver_velocity);
4968        __tmp.put_u16_le(self.flags.bits());
4969        __tmp.put_u16_le(self.squawk);
4970        __tmp.put_u8(self.altitude_type as u8);
4971        for val in &self.callsign {
4972            __tmp.put_u8(*val);
4973        }
4974        __tmp.put_u8(self.emitter_type as u8);
4975        __tmp.put_u8(self.tslc);
4976        if matches!(version, MavlinkVersion::V2) {
4977            let len = __tmp.len();
4978            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4979        } else {
4980            __tmp.len()
4981        }
4982    }
4983}
4984#[doc = "id: 301"]
4985#[doc = "The location and information of an AIS vessel."]
4986#[derive(Debug, Clone, PartialEq)]
4987#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4988#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4989pub struct AIS_VESSEL_DATA {
4990    #[doc = "Mobile Marine Service Identifier, 9 decimal digits"]
4991    pub MMSI: u32,
4992    #[doc = "Latitude"]
4993    pub lat: i32,
4994    #[doc = "Longitude"]
4995    pub lon: i32,
4996    #[doc = "Course over ground"]
4997    pub COG: u16,
4998    #[doc = "True heading"]
4999    pub heading: u16,
5000    #[doc = "Speed over ground"]
5001    pub velocity: u16,
5002    #[doc = "Distance from lat/lon location to bow"]
5003    pub dimension_bow: u16,
5004    #[doc = "Distance from lat/lon location to stern"]
5005    pub dimension_stern: u16,
5006    #[doc = "Time since last communication in seconds"]
5007    pub tslc: u16,
5008    #[doc = "Bitmask to indicate various statuses including valid data fields"]
5009    pub flags: AisFlags,
5010    #[doc = "Turn rate"]
5011    pub turn_rate: i8,
5012    #[doc = "Navigational status"]
5013    pub navigational_status: AisNavStatus,
5014    #[doc = "Type of vessels"]
5015    pub mavtype: AisType,
5016    #[doc = "Distance from lat/lon location to port side"]
5017    pub dimension_port: u8,
5018    #[doc = "Distance from lat/lon location to starboard side"]
5019    pub dimension_starboard: u8,
5020    #[doc = "The vessel callsign"]
5021    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5022    pub callsign: [u8; 7],
5023    #[doc = "The vessel name"]
5024    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5025    pub name: [u8; 20],
5026}
5027impl AIS_VESSEL_DATA {
5028    pub const ENCODED_LEN: usize = 58usize;
5029    pub const DEFAULT: Self = Self {
5030        MMSI: 0_u32,
5031        lat: 0_i32,
5032        lon: 0_i32,
5033        COG: 0_u16,
5034        heading: 0_u16,
5035        velocity: 0_u16,
5036        dimension_bow: 0_u16,
5037        dimension_stern: 0_u16,
5038        tslc: 0_u16,
5039        flags: AisFlags::DEFAULT,
5040        turn_rate: 0_i8,
5041        navigational_status: AisNavStatus::DEFAULT,
5042        mavtype: AisType::DEFAULT,
5043        dimension_port: 0_u8,
5044        dimension_starboard: 0_u8,
5045        callsign: [0_u8; 7usize],
5046        name: [0_u8; 20usize],
5047    };
5048    #[cfg(feature = "arbitrary")]
5049    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5050        use arbitrary::{Arbitrary, Unstructured};
5051        let mut buf = [0u8; 1024];
5052        rng.fill_bytes(&mut buf);
5053        let mut unstructured = Unstructured::new(&buf);
5054        Self::arbitrary(&mut unstructured).unwrap_or_default()
5055    }
5056}
5057impl Default for AIS_VESSEL_DATA {
5058    fn default() -> Self {
5059        Self::DEFAULT.clone()
5060    }
5061}
5062impl MessageData for AIS_VESSEL_DATA {
5063    type Message = MavMessage;
5064    const ID: u32 = 301u32;
5065    const NAME: &'static str = "AIS_VESSEL";
5066    const EXTRA_CRC: u8 = 243u8;
5067    const ENCODED_LEN: usize = 58usize;
5068    fn deser(
5069        _version: MavlinkVersion,
5070        __input: &[u8],
5071    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5072        let avail_len = __input.len();
5073        let mut payload_buf = [0; Self::ENCODED_LEN];
5074        let mut buf = if avail_len < Self::ENCODED_LEN {
5075            payload_buf[0..avail_len].copy_from_slice(__input);
5076            Bytes::new(&payload_buf)
5077        } else {
5078            Bytes::new(__input)
5079        };
5080        let mut __struct = Self::default();
5081        __struct.MMSI = buf.get_u32_le();
5082        __struct.lat = buf.get_i32_le();
5083        __struct.lon = buf.get_i32_le();
5084        __struct.COG = buf.get_u16_le();
5085        __struct.heading = buf.get_u16_le();
5086        __struct.velocity = buf.get_u16_le();
5087        __struct.dimension_bow = buf.get_u16_le();
5088        __struct.dimension_stern = buf.get_u16_le();
5089        __struct.tslc = buf.get_u16_le();
5090        let tmp = buf.get_u16_le();
5091        __struct.flags = AisFlags::from_bits(tmp & AisFlags::all().bits()).ok_or(
5092            ::mavlink_core::error::ParserError::InvalidFlag {
5093                flag_type: "AisFlags",
5094                value: tmp as u32,
5095            },
5096        )?;
5097        __struct.turn_rate = buf.get_i8();
5098        let tmp = buf.get_u8();
5099        __struct.navigational_status =
5100            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5101                enum_type: "AisNavStatus",
5102                value: tmp as u32,
5103            })?;
5104        let tmp = buf.get_u8();
5105        __struct.mavtype =
5106            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5107                enum_type: "AisType",
5108                value: tmp as u32,
5109            })?;
5110        __struct.dimension_port = buf.get_u8();
5111        __struct.dimension_starboard = buf.get_u8();
5112        for v in &mut __struct.callsign {
5113            let val = buf.get_u8();
5114            *v = val;
5115        }
5116        for v in &mut __struct.name {
5117            let val = buf.get_u8();
5118            *v = val;
5119        }
5120        Ok(__struct)
5121    }
5122    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5123        let mut __tmp = BytesMut::new(bytes);
5124        #[allow(clippy::absurd_extreme_comparisons)]
5125        #[allow(unused_comparisons)]
5126        if __tmp.remaining() < Self::ENCODED_LEN {
5127            panic!(
5128                "buffer is too small (need {} bytes, but got {})",
5129                Self::ENCODED_LEN,
5130                __tmp.remaining(),
5131            )
5132        }
5133        __tmp.put_u32_le(self.MMSI);
5134        __tmp.put_i32_le(self.lat);
5135        __tmp.put_i32_le(self.lon);
5136        __tmp.put_u16_le(self.COG);
5137        __tmp.put_u16_le(self.heading);
5138        __tmp.put_u16_le(self.velocity);
5139        __tmp.put_u16_le(self.dimension_bow);
5140        __tmp.put_u16_le(self.dimension_stern);
5141        __tmp.put_u16_le(self.tslc);
5142        __tmp.put_u16_le(self.flags.bits());
5143        __tmp.put_i8(self.turn_rate);
5144        __tmp.put_u8(self.navigational_status as u8);
5145        __tmp.put_u8(self.mavtype as u8);
5146        __tmp.put_u8(self.dimension_port);
5147        __tmp.put_u8(self.dimension_starboard);
5148        for val in &self.callsign {
5149            __tmp.put_u8(*val);
5150        }
5151        for val in &self.name {
5152            __tmp.put_u8(*val);
5153        }
5154        if matches!(version, MavlinkVersion::V2) {
5155            let len = __tmp.len();
5156            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5157        } else {
5158            __tmp.len()
5159        }
5160    }
5161}
5162#[doc = "id: 141"]
5163#[doc = "The current system altitude."]
5164#[derive(Debug, Clone, PartialEq)]
5165#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5166#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5167pub struct ALTITUDE_DATA {
5168    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5169    pub time_usec: u64,
5170    #[doc = "This altitude measure is initialized on system boot and monotonic (it is never reset, but represents the local altitude change). The only guarantee on this field is that it will never be reset and is consistent within a flight. The recommended value for this field is the uncorrected barometric altitude at boot time. This altitude will also drift and vary between flights."]
5171    pub altitude_monotonic: f32,
5172    #[doc = "This altitude measure is strictly above mean sea level and might be non-monotonic (it might reset on events like GPS lock or when a new QNH value is set). It should be the altitude to which global altitude waypoints are compared to. Note that it is *not* the GPS altitude, however, most GPS modules already output MSL by default and not the WGS84 altitude."]
5173    pub altitude_amsl: f32,
5174    #[doc = "This is the local altitude in the local coordinate frame. It is not the altitude above home, but in reference to the coordinate origin (0, 0, 0). It is up-positive."]
5175    pub altitude_local: f32,
5176    #[doc = "This is the altitude above the home position. It resets on each change of the current home position."]
5177    pub altitude_relative: f32,
5178    #[doc = "This is the altitude above terrain. It might be fed by a terrain database or an altimeter. Values smaller than -1000 should be interpreted as unknown."]
5179    pub altitude_terrain: f32,
5180    #[doc = "This is not the altitude, but the clear space below the system according to the fused clearance estimate. It generally should max out at the maximum range of e.g. the laser altimeter. It is generally a moving target. A negative value indicates no measurement available."]
5181    pub bottom_clearance: f32,
5182}
5183impl ALTITUDE_DATA {
5184    pub const ENCODED_LEN: usize = 32usize;
5185    pub const DEFAULT: Self = Self {
5186        time_usec: 0_u64,
5187        altitude_monotonic: 0.0_f32,
5188        altitude_amsl: 0.0_f32,
5189        altitude_local: 0.0_f32,
5190        altitude_relative: 0.0_f32,
5191        altitude_terrain: 0.0_f32,
5192        bottom_clearance: 0.0_f32,
5193    };
5194    #[cfg(feature = "arbitrary")]
5195    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5196        use arbitrary::{Arbitrary, Unstructured};
5197        let mut buf = [0u8; 1024];
5198        rng.fill_bytes(&mut buf);
5199        let mut unstructured = Unstructured::new(&buf);
5200        Self::arbitrary(&mut unstructured).unwrap_or_default()
5201    }
5202}
5203impl Default for ALTITUDE_DATA {
5204    fn default() -> Self {
5205        Self::DEFAULT.clone()
5206    }
5207}
5208impl MessageData for ALTITUDE_DATA {
5209    type Message = MavMessage;
5210    const ID: u32 = 141u32;
5211    const NAME: &'static str = "ALTITUDE";
5212    const EXTRA_CRC: u8 = 47u8;
5213    const ENCODED_LEN: usize = 32usize;
5214    fn deser(
5215        _version: MavlinkVersion,
5216        __input: &[u8],
5217    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5218        let avail_len = __input.len();
5219        let mut payload_buf = [0; Self::ENCODED_LEN];
5220        let mut buf = if avail_len < Self::ENCODED_LEN {
5221            payload_buf[0..avail_len].copy_from_slice(__input);
5222            Bytes::new(&payload_buf)
5223        } else {
5224            Bytes::new(__input)
5225        };
5226        let mut __struct = Self::default();
5227        __struct.time_usec = buf.get_u64_le();
5228        __struct.altitude_monotonic = buf.get_f32_le();
5229        __struct.altitude_amsl = buf.get_f32_le();
5230        __struct.altitude_local = buf.get_f32_le();
5231        __struct.altitude_relative = buf.get_f32_le();
5232        __struct.altitude_terrain = buf.get_f32_le();
5233        __struct.bottom_clearance = buf.get_f32_le();
5234        Ok(__struct)
5235    }
5236    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5237        let mut __tmp = BytesMut::new(bytes);
5238        #[allow(clippy::absurd_extreme_comparisons)]
5239        #[allow(unused_comparisons)]
5240        if __tmp.remaining() < Self::ENCODED_LEN {
5241            panic!(
5242                "buffer is too small (need {} bytes, but got {})",
5243                Self::ENCODED_LEN,
5244                __tmp.remaining(),
5245            )
5246        }
5247        __tmp.put_u64_le(self.time_usec);
5248        __tmp.put_f32_le(self.altitude_monotonic);
5249        __tmp.put_f32_le(self.altitude_amsl);
5250        __tmp.put_f32_le(self.altitude_local);
5251        __tmp.put_f32_le(self.altitude_relative);
5252        __tmp.put_f32_le(self.altitude_terrain);
5253        __tmp.put_f32_le(self.bottom_clearance);
5254        if matches!(version, MavlinkVersion::V2) {
5255            let len = __tmp.len();
5256            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5257        } else {
5258            __tmp.len()
5259        }
5260    }
5261}
5262#[doc = "id: 30"]
5263#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
5264#[derive(Debug, Clone, PartialEq)]
5265#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5266#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5267pub struct ATTITUDE_DATA {
5268    #[doc = "Timestamp (time since system boot)."]
5269    pub time_boot_ms: u32,
5270    #[doc = "Roll angle (-pi..+pi)"]
5271    pub roll: f32,
5272    #[doc = "Pitch angle (-pi..+pi)"]
5273    pub pitch: f32,
5274    #[doc = "Yaw angle (-pi..+pi)"]
5275    pub yaw: f32,
5276    #[doc = "Roll angular speed"]
5277    pub rollspeed: f32,
5278    #[doc = "Pitch angular speed"]
5279    pub pitchspeed: f32,
5280    #[doc = "Yaw angular speed"]
5281    pub yawspeed: f32,
5282}
5283impl ATTITUDE_DATA {
5284    pub const ENCODED_LEN: usize = 28usize;
5285    pub const DEFAULT: Self = Self {
5286        time_boot_ms: 0_u32,
5287        roll: 0.0_f32,
5288        pitch: 0.0_f32,
5289        yaw: 0.0_f32,
5290        rollspeed: 0.0_f32,
5291        pitchspeed: 0.0_f32,
5292        yawspeed: 0.0_f32,
5293    };
5294    #[cfg(feature = "arbitrary")]
5295    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5296        use arbitrary::{Arbitrary, Unstructured};
5297        let mut buf = [0u8; 1024];
5298        rng.fill_bytes(&mut buf);
5299        let mut unstructured = Unstructured::new(&buf);
5300        Self::arbitrary(&mut unstructured).unwrap_or_default()
5301    }
5302}
5303impl Default for ATTITUDE_DATA {
5304    fn default() -> Self {
5305        Self::DEFAULT.clone()
5306    }
5307}
5308impl MessageData for ATTITUDE_DATA {
5309    type Message = MavMessage;
5310    const ID: u32 = 30u32;
5311    const NAME: &'static str = "ATTITUDE";
5312    const EXTRA_CRC: u8 = 39u8;
5313    const ENCODED_LEN: usize = 28usize;
5314    fn deser(
5315        _version: MavlinkVersion,
5316        __input: &[u8],
5317    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5318        let avail_len = __input.len();
5319        let mut payload_buf = [0; Self::ENCODED_LEN];
5320        let mut buf = if avail_len < Self::ENCODED_LEN {
5321            payload_buf[0..avail_len].copy_from_slice(__input);
5322            Bytes::new(&payload_buf)
5323        } else {
5324            Bytes::new(__input)
5325        };
5326        let mut __struct = Self::default();
5327        __struct.time_boot_ms = buf.get_u32_le();
5328        __struct.roll = buf.get_f32_le();
5329        __struct.pitch = buf.get_f32_le();
5330        __struct.yaw = buf.get_f32_le();
5331        __struct.rollspeed = buf.get_f32_le();
5332        __struct.pitchspeed = buf.get_f32_le();
5333        __struct.yawspeed = buf.get_f32_le();
5334        Ok(__struct)
5335    }
5336    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5337        let mut __tmp = BytesMut::new(bytes);
5338        #[allow(clippy::absurd_extreme_comparisons)]
5339        #[allow(unused_comparisons)]
5340        if __tmp.remaining() < Self::ENCODED_LEN {
5341            panic!(
5342                "buffer is too small (need {} bytes, but got {})",
5343                Self::ENCODED_LEN,
5344                __tmp.remaining(),
5345            )
5346        }
5347        __tmp.put_u32_le(self.time_boot_ms);
5348        __tmp.put_f32_le(self.roll);
5349        __tmp.put_f32_le(self.pitch);
5350        __tmp.put_f32_le(self.yaw);
5351        __tmp.put_f32_le(self.rollspeed);
5352        __tmp.put_f32_le(self.pitchspeed);
5353        __tmp.put_f32_le(self.yawspeed);
5354        if matches!(version, MavlinkVersion::V2) {
5355            let len = __tmp.len();
5356            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5357        } else {
5358            __tmp.len()
5359        }
5360    }
5361}
5362#[doc = "id: 31"]
5363#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
5364#[derive(Debug, Clone, PartialEq)]
5365#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5366#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5367pub struct ATTITUDE_QUATERNION_DATA {
5368    #[doc = "Timestamp (time since system boot)."]
5369    pub time_boot_ms: u32,
5370    #[doc = "Quaternion component 1, w (1 in null-rotation)"]
5371    pub q1: f32,
5372    #[doc = "Quaternion component 2, x (0 in null-rotation)"]
5373    pub q2: f32,
5374    #[doc = "Quaternion component 3, y (0 in null-rotation)"]
5375    pub q3: f32,
5376    #[doc = "Quaternion component 4, z (0 in null-rotation)"]
5377    pub q4: f32,
5378    #[doc = "Roll angular speed"]
5379    pub rollspeed: f32,
5380    #[doc = "Pitch angular speed"]
5381    pub pitchspeed: f32,
5382    #[doc = "Yaw angular speed"]
5383    pub yawspeed: f32,
5384    #[doc = "Rotation offset by which the attitude quaternion and angular speed vector should be rotated for user display (quaternion with [w, x, y, z] order, zero-rotation is [1, 0, 0, 0], send [0, 0, 0, 0] if field not supported). This field is intended for systems in which the reference attitude may change during flight. For example, tailsitters VTOLs rotate their reference attitude by 90 degrees between hover mode and fixed wing mode, thus repr_offset_q is equal to [1, 0, 0, 0] in hover mode and equal to [0.7071, 0, 0.7071, 0] in fixed wing mode."]
5385    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5386    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5387    pub repr_offset_q: [f32; 4],
5388}
5389impl ATTITUDE_QUATERNION_DATA {
5390    pub const ENCODED_LEN: usize = 48usize;
5391    pub const DEFAULT: Self = Self {
5392        time_boot_ms: 0_u32,
5393        q1: 0.0_f32,
5394        q2: 0.0_f32,
5395        q3: 0.0_f32,
5396        q4: 0.0_f32,
5397        rollspeed: 0.0_f32,
5398        pitchspeed: 0.0_f32,
5399        yawspeed: 0.0_f32,
5400        repr_offset_q: [0.0_f32; 4usize],
5401    };
5402    #[cfg(feature = "arbitrary")]
5403    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5404        use arbitrary::{Arbitrary, Unstructured};
5405        let mut buf = [0u8; 1024];
5406        rng.fill_bytes(&mut buf);
5407        let mut unstructured = Unstructured::new(&buf);
5408        Self::arbitrary(&mut unstructured).unwrap_or_default()
5409    }
5410}
5411impl Default for ATTITUDE_QUATERNION_DATA {
5412    fn default() -> Self {
5413        Self::DEFAULT.clone()
5414    }
5415}
5416impl MessageData for ATTITUDE_QUATERNION_DATA {
5417    type Message = MavMessage;
5418    const ID: u32 = 31u32;
5419    const NAME: &'static str = "ATTITUDE_QUATERNION";
5420    const EXTRA_CRC: u8 = 246u8;
5421    const ENCODED_LEN: usize = 48usize;
5422    fn deser(
5423        _version: MavlinkVersion,
5424        __input: &[u8],
5425    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5426        let avail_len = __input.len();
5427        let mut payload_buf = [0; Self::ENCODED_LEN];
5428        let mut buf = if avail_len < Self::ENCODED_LEN {
5429            payload_buf[0..avail_len].copy_from_slice(__input);
5430            Bytes::new(&payload_buf)
5431        } else {
5432            Bytes::new(__input)
5433        };
5434        let mut __struct = Self::default();
5435        __struct.time_boot_ms = buf.get_u32_le();
5436        __struct.q1 = buf.get_f32_le();
5437        __struct.q2 = buf.get_f32_le();
5438        __struct.q3 = buf.get_f32_le();
5439        __struct.q4 = buf.get_f32_le();
5440        __struct.rollspeed = buf.get_f32_le();
5441        __struct.pitchspeed = buf.get_f32_le();
5442        __struct.yawspeed = buf.get_f32_le();
5443        for v in &mut __struct.repr_offset_q {
5444            let val = buf.get_f32_le();
5445            *v = val;
5446        }
5447        Ok(__struct)
5448    }
5449    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5450        let mut __tmp = BytesMut::new(bytes);
5451        #[allow(clippy::absurd_extreme_comparisons)]
5452        #[allow(unused_comparisons)]
5453        if __tmp.remaining() < Self::ENCODED_LEN {
5454            panic!(
5455                "buffer is too small (need {} bytes, but got {})",
5456                Self::ENCODED_LEN,
5457                __tmp.remaining(),
5458            )
5459        }
5460        __tmp.put_u32_le(self.time_boot_ms);
5461        __tmp.put_f32_le(self.q1);
5462        __tmp.put_f32_le(self.q2);
5463        __tmp.put_f32_le(self.q3);
5464        __tmp.put_f32_le(self.q4);
5465        __tmp.put_f32_le(self.rollspeed);
5466        __tmp.put_f32_le(self.pitchspeed);
5467        __tmp.put_f32_le(self.yawspeed);
5468        for val in &self.repr_offset_q {
5469            __tmp.put_f32_le(*val);
5470        }
5471        if matches!(version, MavlinkVersion::V2) {
5472            let len = __tmp.len();
5473            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5474        } else {
5475            __tmp.len()
5476        }
5477    }
5478}
5479#[doc = "id: 61"]
5480#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
5481#[derive(Debug, Clone, PartialEq)]
5482#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5483#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5484pub struct ATTITUDE_QUATERNION_COV_DATA {
5485    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5486    pub time_usec: u64,
5487    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
5488    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5489    pub q: [f32; 4],
5490    #[doc = "Roll angular speed"]
5491    pub rollspeed: f32,
5492    #[doc = "Pitch angular speed"]
5493    pub pitchspeed: f32,
5494    #[doc = "Yaw angular speed"]
5495    pub yawspeed: f32,
5496    #[doc = "Row-major representation of a 3x3 attitude covariance matrix (states: roll, pitch, yaw; first three entries are the first ROW, next three entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
5497    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5498    pub covariance: [f32; 9],
5499}
5500impl ATTITUDE_QUATERNION_COV_DATA {
5501    pub const ENCODED_LEN: usize = 72usize;
5502    pub const DEFAULT: Self = Self {
5503        time_usec: 0_u64,
5504        q: [0.0_f32; 4usize],
5505        rollspeed: 0.0_f32,
5506        pitchspeed: 0.0_f32,
5507        yawspeed: 0.0_f32,
5508        covariance: [0.0_f32; 9usize],
5509    };
5510    #[cfg(feature = "arbitrary")]
5511    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5512        use arbitrary::{Arbitrary, Unstructured};
5513        let mut buf = [0u8; 1024];
5514        rng.fill_bytes(&mut buf);
5515        let mut unstructured = Unstructured::new(&buf);
5516        Self::arbitrary(&mut unstructured).unwrap_or_default()
5517    }
5518}
5519impl Default for ATTITUDE_QUATERNION_COV_DATA {
5520    fn default() -> Self {
5521        Self::DEFAULT.clone()
5522    }
5523}
5524impl MessageData for ATTITUDE_QUATERNION_COV_DATA {
5525    type Message = MavMessage;
5526    const ID: u32 = 61u32;
5527    const NAME: &'static str = "ATTITUDE_QUATERNION_COV";
5528    const EXTRA_CRC: u8 = 167u8;
5529    const ENCODED_LEN: usize = 72usize;
5530    fn deser(
5531        _version: MavlinkVersion,
5532        __input: &[u8],
5533    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5534        let avail_len = __input.len();
5535        let mut payload_buf = [0; Self::ENCODED_LEN];
5536        let mut buf = if avail_len < Self::ENCODED_LEN {
5537            payload_buf[0..avail_len].copy_from_slice(__input);
5538            Bytes::new(&payload_buf)
5539        } else {
5540            Bytes::new(__input)
5541        };
5542        let mut __struct = Self::default();
5543        __struct.time_usec = buf.get_u64_le();
5544        for v in &mut __struct.q {
5545            let val = buf.get_f32_le();
5546            *v = val;
5547        }
5548        __struct.rollspeed = buf.get_f32_le();
5549        __struct.pitchspeed = buf.get_f32_le();
5550        __struct.yawspeed = buf.get_f32_le();
5551        for v in &mut __struct.covariance {
5552            let val = buf.get_f32_le();
5553            *v = val;
5554        }
5555        Ok(__struct)
5556    }
5557    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5558        let mut __tmp = BytesMut::new(bytes);
5559        #[allow(clippy::absurd_extreme_comparisons)]
5560        #[allow(unused_comparisons)]
5561        if __tmp.remaining() < Self::ENCODED_LEN {
5562            panic!(
5563                "buffer is too small (need {} bytes, but got {})",
5564                Self::ENCODED_LEN,
5565                __tmp.remaining(),
5566            )
5567        }
5568        __tmp.put_u64_le(self.time_usec);
5569        for val in &self.q {
5570            __tmp.put_f32_le(*val);
5571        }
5572        __tmp.put_f32_le(self.rollspeed);
5573        __tmp.put_f32_le(self.pitchspeed);
5574        __tmp.put_f32_le(self.yawspeed);
5575        for val in &self.covariance {
5576            __tmp.put_f32_le(*val);
5577        }
5578        if matches!(version, MavlinkVersion::V2) {
5579            let len = __tmp.len();
5580            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5581        } else {
5582            __tmp.len()
5583        }
5584    }
5585}
5586#[doc = "id: 83"]
5587#[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
5588#[derive(Debug, Clone, PartialEq)]
5589#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5590#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5591pub struct ATTITUDE_TARGET_DATA {
5592    #[doc = "Timestamp (time since system boot)."]
5593    pub time_boot_ms: u32,
5594    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
5595    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5596    pub q: [f32; 4],
5597    #[doc = "Body roll rate"]
5598    pub body_roll_rate: f32,
5599    #[doc = "Body pitch rate"]
5600    pub body_pitch_rate: f32,
5601    #[doc = "Body yaw rate"]
5602    pub body_yaw_rate: f32,
5603    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
5604    pub thrust: f32,
5605    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
5606    pub type_mask: AttitudeTargetTypemask,
5607}
5608impl ATTITUDE_TARGET_DATA {
5609    pub const ENCODED_LEN: usize = 37usize;
5610    pub const DEFAULT: Self = Self {
5611        time_boot_ms: 0_u32,
5612        q: [0.0_f32; 4usize],
5613        body_roll_rate: 0.0_f32,
5614        body_pitch_rate: 0.0_f32,
5615        body_yaw_rate: 0.0_f32,
5616        thrust: 0.0_f32,
5617        type_mask: AttitudeTargetTypemask::DEFAULT,
5618    };
5619    #[cfg(feature = "arbitrary")]
5620    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5621        use arbitrary::{Arbitrary, Unstructured};
5622        let mut buf = [0u8; 1024];
5623        rng.fill_bytes(&mut buf);
5624        let mut unstructured = Unstructured::new(&buf);
5625        Self::arbitrary(&mut unstructured).unwrap_or_default()
5626    }
5627}
5628impl Default for ATTITUDE_TARGET_DATA {
5629    fn default() -> Self {
5630        Self::DEFAULT.clone()
5631    }
5632}
5633impl MessageData for ATTITUDE_TARGET_DATA {
5634    type Message = MavMessage;
5635    const ID: u32 = 83u32;
5636    const NAME: &'static str = "ATTITUDE_TARGET";
5637    const EXTRA_CRC: u8 = 22u8;
5638    const ENCODED_LEN: usize = 37usize;
5639    fn deser(
5640        _version: MavlinkVersion,
5641        __input: &[u8],
5642    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5643        let avail_len = __input.len();
5644        let mut payload_buf = [0; Self::ENCODED_LEN];
5645        let mut buf = if avail_len < Self::ENCODED_LEN {
5646            payload_buf[0..avail_len].copy_from_slice(__input);
5647            Bytes::new(&payload_buf)
5648        } else {
5649            Bytes::new(__input)
5650        };
5651        let mut __struct = Self::default();
5652        __struct.time_boot_ms = buf.get_u32_le();
5653        for v in &mut __struct.q {
5654            let val = buf.get_f32_le();
5655            *v = val;
5656        }
5657        __struct.body_roll_rate = buf.get_f32_le();
5658        __struct.body_pitch_rate = buf.get_f32_le();
5659        __struct.body_yaw_rate = buf.get_f32_le();
5660        __struct.thrust = buf.get_f32_le();
5661        let tmp = buf.get_u8();
5662        __struct.type_mask = AttitudeTargetTypemask::from_bits(
5663            tmp & AttitudeTargetTypemask::all().bits(),
5664        )
5665        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
5666            flag_type: "AttitudeTargetTypemask",
5667            value: tmp as u32,
5668        })?;
5669        Ok(__struct)
5670    }
5671    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5672        let mut __tmp = BytesMut::new(bytes);
5673        #[allow(clippy::absurd_extreme_comparisons)]
5674        #[allow(unused_comparisons)]
5675        if __tmp.remaining() < Self::ENCODED_LEN {
5676            panic!(
5677                "buffer is too small (need {} bytes, but got {})",
5678                Self::ENCODED_LEN,
5679                __tmp.remaining(),
5680            )
5681        }
5682        __tmp.put_u32_le(self.time_boot_ms);
5683        for val in &self.q {
5684            __tmp.put_f32_le(*val);
5685        }
5686        __tmp.put_f32_le(self.body_roll_rate);
5687        __tmp.put_f32_le(self.body_pitch_rate);
5688        __tmp.put_f32_le(self.body_yaw_rate);
5689        __tmp.put_f32_le(self.thrust);
5690        __tmp.put_u8(self.type_mask.bits());
5691        if matches!(version, MavlinkVersion::V2) {
5692            let len = __tmp.len();
5693            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5694        } else {
5695            __tmp.len()
5696        }
5697    }
5698}
5699#[doc = "id: 138"]
5700#[doc = "Motion capture attitude and position."]
5701#[derive(Debug, Clone, PartialEq)]
5702#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5703#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5704pub struct ATT_POS_MOCAP_DATA {
5705    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5706    pub time_usec: u64,
5707    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
5708    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5709    pub q: [f32; 4],
5710    #[doc = "X position (NED)"]
5711    pub x: f32,
5712    #[doc = "Y position (NED)"]
5713    pub y: f32,
5714    #[doc = "Z position (NED)"]
5715    pub z: f32,
5716    #[doc = "Row-major representation of a pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
5717    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5718    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5719    pub covariance: [f32; 21],
5720}
5721impl ATT_POS_MOCAP_DATA {
5722    pub const ENCODED_LEN: usize = 120usize;
5723    pub const DEFAULT: Self = Self {
5724        time_usec: 0_u64,
5725        q: [0.0_f32; 4usize],
5726        x: 0.0_f32,
5727        y: 0.0_f32,
5728        z: 0.0_f32,
5729        covariance: [0.0_f32; 21usize],
5730    };
5731    #[cfg(feature = "arbitrary")]
5732    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5733        use arbitrary::{Arbitrary, Unstructured};
5734        let mut buf = [0u8; 1024];
5735        rng.fill_bytes(&mut buf);
5736        let mut unstructured = Unstructured::new(&buf);
5737        Self::arbitrary(&mut unstructured).unwrap_or_default()
5738    }
5739}
5740impl Default for ATT_POS_MOCAP_DATA {
5741    fn default() -> Self {
5742        Self::DEFAULT.clone()
5743    }
5744}
5745impl MessageData for ATT_POS_MOCAP_DATA {
5746    type Message = MavMessage;
5747    const ID: u32 = 138u32;
5748    const NAME: &'static str = "ATT_POS_MOCAP";
5749    const EXTRA_CRC: u8 = 109u8;
5750    const ENCODED_LEN: usize = 120usize;
5751    fn deser(
5752        _version: MavlinkVersion,
5753        __input: &[u8],
5754    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5755        let avail_len = __input.len();
5756        let mut payload_buf = [0; Self::ENCODED_LEN];
5757        let mut buf = if avail_len < Self::ENCODED_LEN {
5758            payload_buf[0..avail_len].copy_from_slice(__input);
5759            Bytes::new(&payload_buf)
5760        } else {
5761            Bytes::new(__input)
5762        };
5763        let mut __struct = Self::default();
5764        __struct.time_usec = buf.get_u64_le();
5765        for v in &mut __struct.q {
5766            let val = buf.get_f32_le();
5767            *v = val;
5768        }
5769        __struct.x = buf.get_f32_le();
5770        __struct.y = buf.get_f32_le();
5771        __struct.z = buf.get_f32_le();
5772        for v in &mut __struct.covariance {
5773            let val = buf.get_f32_le();
5774            *v = val;
5775        }
5776        Ok(__struct)
5777    }
5778    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5779        let mut __tmp = BytesMut::new(bytes);
5780        #[allow(clippy::absurd_extreme_comparisons)]
5781        #[allow(unused_comparisons)]
5782        if __tmp.remaining() < Self::ENCODED_LEN {
5783            panic!(
5784                "buffer is too small (need {} bytes, but got {})",
5785                Self::ENCODED_LEN,
5786                __tmp.remaining(),
5787            )
5788        }
5789        __tmp.put_u64_le(self.time_usec);
5790        for val in &self.q {
5791            __tmp.put_f32_le(*val);
5792        }
5793        __tmp.put_f32_le(self.x);
5794        __tmp.put_f32_le(self.y);
5795        __tmp.put_f32_le(self.z);
5796        for val in &self.covariance {
5797            __tmp.put_f32_le(*val);
5798        }
5799        if matches!(version, MavlinkVersion::V2) {
5800            let len = __tmp.len();
5801            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5802        } else {
5803            __tmp.len()
5804        }
5805    }
5806}
5807#[doc = "id: 7"]
5808#[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
5809#[derive(Debug, Clone, PartialEq)]
5810#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5811#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5812pub struct AUTH_KEY_DATA {
5813    #[doc = "key"]
5814    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5815    pub key: [u8; 32],
5816}
5817impl AUTH_KEY_DATA {
5818    pub const ENCODED_LEN: usize = 32usize;
5819    pub const DEFAULT: Self = Self {
5820        key: [0_u8; 32usize],
5821    };
5822    #[cfg(feature = "arbitrary")]
5823    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5824        use arbitrary::{Arbitrary, Unstructured};
5825        let mut buf = [0u8; 1024];
5826        rng.fill_bytes(&mut buf);
5827        let mut unstructured = Unstructured::new(&buf);
5828        Self::arbitrary(&mut unstructured).unwrap_or_default()
5829    }
5830}
5831impl Default for AUTH_KEY_DATA {
5832    fn default() -> Self {
5833        Self::DEFAULT.clone()
5834    }
5835}
5836impl MessageData for AUTH_KEY_DATA {
5837    type Message = MavMessage;
5838    const ID: u32 = 7u32;
5839    const NAME: &'static str = "AUTH_KEY";
5840    const EXTRA_CRC: u8 = 119u8;
5841    const ENCODED_LEN: usize = 32usize;
5842    fn deser(
5843        _version: MavlinkVersion,
5844        __input: &[u8],
5845    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5846        let avail_len = __input.len();
5847        let mut payload_buf = [0; Self::ENCODED_LEN];
5848        let mut buf = if avail_len < Self::ENCODED_LEN {
5849            payload_buf[0..avail_len].copy_from_slice(__input);
5850            Bytes::new(&payload_buf)
5851        } else {
5852            Bytes::new(__input)
5853        };
5854        let mut __struct = Self::default();
5855        for v in &mut __struct.key {
5856            let val = buf.get_u8();
5857            *v = val;
5858        }
5859        Ok(__struct)
5860    }
5861    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5862        let mut __tmp = BytesMut::new(bytes);
5863        #[allow(clippy::absurd_extreme_comparisons)]
5864        #[allow(unused_comparisons)]
5865        if __tmp.remaining() < Self::ENCODED_LEN {
5866            panic!(
5867                "buffer is too small (need {} bytes, but got {})",
5868                Self::ENCODED_LEN,
5869                __tmp.remaining(),
5870            )
5871        }
5872        for val in &self.key {
5873            __tmp.put_u8(*val);
5874        }
5875        if matches!(version, MavlinkVersion::V2) {
5876            let len = __tmp.len();
5877            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5878        } else {
5879            __tmp.len()
5880        }
5881    }
5882}
5883#[doc = "id: 286"]
5884#[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
5885#[derive(Debug, Clone, PartialEq)]
5886#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5887#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5888pub struct AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
5889    #[doc = "Timestamp (time since system boot)."]
5890    pub time_boot_us: u64,
5891    #[doc = "Quaternion components of autopilot attitude: w, x, y, z (1 0 0 0 is the null-rotation, Hamilton convention)."]
5892    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5893    pub q: [f32; 4],
5894    #[doc = "Estimated delay of the attitude data. 0 if unknown."]
5895    pub q_estimated_delay_us: u32,
5896    #[doc = "X Speed in NED (North, East, Down). NAN if unknown."]
5897    pub vx: f32,
5898    #[doc = "Y Speed in NED (North, East, Down). NAN if unknown."]
5899    pub vy: f32,
5900    #[doc = "Z Speed in NED (North, East, Down). NAN if unknown."]
5901    pub vz: f32,
5902    #[doc = "Estimated delay of the speed data. 0 if unknown."]
5903    pub v_estimated_delay_us: u32,
5904    #[doc = "Feed forward Z component of angular velocity (positive: yawing to the right). NaN to be ignored. This is to indicate if the autopilot is actively yawing."]
5905    pub feed_forward_angular_velocity_z: f32,
5906    #[doc = "Bitmap indicating which estimator outputs are valid."]
5907    pub estimator_status: EstimatorStatusFlags,
5908    #[doc = "System ID"]
5909    pub target_system: u8,
5910    #[doc = "Component ID"]
5911    pub target_component: u8,
5912    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
5913    pub landed_state: MavLandedState,
5914    #[doc = "Z component of angular velocity in NED (North, East, Down). NaN if unknown."]
5915    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5916    pub angular_velocity_z: f32,
5917}
5918impl AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
5919    pub const ENCODED_LEN: usize = 57usize;
5920    pub const DEFAULT: Self = Self {
5921        time_boot_us: 0_u64,
5922        q: [0.0_f32; 4usize],
5923        q_estimated_delay_us: 0_u32,
5924        vx: 0.0_f32,
5925        vy: 0.0_f32,
5926        vz: 0.0_f32,
5927        v_estimated_delay_us: 0_u32,
5928        feed_forward_angular_velocity_z: 0.0_f32,
5929        estimator_status: EstimatorStatusFlags::DEFAULT,
5930        target_system: 0_u8,
5931        target_component: 0_u8,
5932        landed_state: MavLandedState::DEFAULT,
5933        angular_velocity_z: 0.0_f32,
5934    };
5935    #[cfg(feature = "arbitrary")]
5936    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5937        use arbitrary::{Arbitrary, Unstructured};
5938        let mut buf = [0u8; 1024];
5939        rng.fill_bytes(&mut buf);
5940        let mut unstructured = Unstructured::new(&buf);
5941        Self::arbitrary(&mut unstructured).unwrap_or_default()
5942    }
5943}
5944impl Default for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
5945    fn default() -> Self {
5946        Self::DEFAULT.clone()
5947    }
5948}
5949impl MessageData for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
5950    type Message = MavMessage;
5951    const ID: u32 = 286u32;
5952    const NAME: &'static str = "AUTOPILOT_STATE_FOR_GIMBAL_DEVICE";
5953    const EXTRA_CRC: u8 = 210u8;
5954    const ENCODED_LEN: usize = 57usize;
5955    fn deser(
5956        _version: MavlinkVersion,
5957        __input: &[u8],
5958    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5959        let avail_len = __input.len();
5960        let mut payload_buf = [0; Self::ENCODED_LEN];
5961        let mut buf = if avail_len < Self::ENCODED_LEN {
5962            payload_buf[0..avail_len].copy_from_slice(__input);
5963            Bytes::new(&payload_buf)
5964        } else {
5965            Bytes::new(__input)
5966        };
5967        let mut __struct = Self::default();
5968        __struct.time_boot_us = buf.get_u64_le();
5969        for v in &mut __struct.q {
5970            let val = buf.get_f32_le();
5971            *v = val;
5972        }
5973        __struct.q_estimated_delay_us = buf.get_u32_le();
5974        __struct.vx = buf.get_f32_le();
5975        __struct.vy = buf.get_f32_le();
5976        __struct.vz = buf.get_f32_le();
5977        __struct.v_estimated_delay_us = buf.get_u32_le();
5978        __struct.feed_forward_angular_velocity_z = buf.get_f32_le();
5979        let tmp = buf.get_u16_le();
5980        __struct.estimator_status = EstimatorStatusFlags::from_bits(
5981            tmp & EstimatorStatusFlags::all().bits(),
5982        )
5983        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
5984            flag_type: "EstimatorStatusFlags",
5985            value: tmp as u32,
5986        })?;
5987        __struct.target_system = buf.get_u8();
5988        __struct.target_component = buf.get_u8();
5989        let tmp = buf.get_u8();
5990        __struct.landed_state =
5991            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5992                enum_type: "MavLandedState",
5993                value: tmp as u32,
5994            })?;
5995        __struct.angular_velocity_z = buf.get_f32_le();
5996        Ok(__struct)
5997    }
5998    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5999        let mut __tmp = BytesMut::new(bytes);
6000        #[allow(clippy::absurd_extreme_comparisons)]
6001        #[allow(unused_comparisons)]
6002        if __tmp.remaining() < Self::ENCODED_LEN {
6003            panic!(
6004                "buffer is too small (need {} bytes, but got {})",
6005                Self::ENCODED_LEN,
6006                __tmp.remaining(),
6007            )
6008        }
6009        __tmp.put_u64_le(self.time_boot_us);
6010        for val in &self.q {
6011            __tmp.put_f32_le(*val);
6012        }
6013        __tmp.put_u32_le(self.q_estimated_delay_us);
6014        __tmp.put_f32_le(self.vx);
6015        __tmp.put_f32_le(self.vy);
6016        __tmp.put_f32_le(self.vz);
6017        __tmp.put_u32_le(self.v_estimated_delay_us);
6018        __tmp.put_f32_le(self.feed_forward_angular_velocity_z);
6019        __tmp.put_u16_le(self.estimator_status.bits());
6020        __tmp.put_u8(self.target_system);
6021        __tmp.put_u8(self.target_component);
6022        __tmp.put_u8(self.landed_state as u8);
6023        __tmp.put_f32_le(self.angular_velocity_z);
6024        if matches!(version, MavlinkVersion::V2) {
6025            let len = __tmp.len();
6026            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6027        } else {
6028            __tmp.len()
6029        }
6030    }
6031}
6032#[doc = "id: 148"]
6033#[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
6034#[derive(Debug, Clone, PartialEq)]
6035#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6036#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6037pub struct AUTOPILOT_VERSION_DATA {
6038    #[doc = "Bitmap of capabilities"]
6039    pub capabilities: MavProtocolCapability,
6040    #[doc = "UID if provided by hardware (see uid2)"]
6041    pub uid: u64,
6042    #[doc = "Firmware version number.         The field must be encoded as 4 bytes, where each byte (shown from MSB to LSB) is part of a semantic version: (major) (minor) (patch) (FIRMWARE_VERSION_TYPE)."]
6043    pub flight_sw_version: u32,
6044    #[doc = "Middleware version number"]
6045    pub middleware_sw_version: u32,
6046    #[doc = "Operating system version number"]
6047    pub os_sw_version: u32,
6048    #[doc = "HW / board version (last 8 bits should be silicon ID, if any). The first 16 bits of this field specify <https://github.com/PX4/PX4-Bootloader/blob/master/board_types.txt>"]
6049    pub board_version: u32,
6050    #[doc = "ID of the board vendor"]
6051    pub vendor_id: u16,
6052    #[doc = "ID of the product"]
6053    pub product_id: u16,
6054    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6055    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6056    pub flight_custom_version: [u8; 8],
6057    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6058    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6059    pub middleware_custom_version: [u8; 8],
6060    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6061    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6062    pub os_custom_version: [u8; 8],
6063    #[doc = "UID if provided by hardware (supersedes the uid field. If this is non-zero, use this field, otherwise use uid)"]
6064    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6065    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6066    pub uid2: [u8; 18],
6067}
6068impl AUTOPILOT_VERSION_DATA {
6069    pub const ENCODED_LEN: usize = 78usize;
6070    pub const DEFAULT: Self = Self {
6071        capabilities: MavProtocolCapability::DEFAULT,
6072        uid: 0_u64,
6073        flight_sw_version: 0_u32,
6074        middleware_sw_version: 0_u32,
6075        os_sw_version: 0_u32,
6076        board_version: 0_u32,
6077        vendor_id: 0_u16,
6078        product_id: 0_u16,
6079        flight_custom_version: [0_u8; 8usize],
6080        middleware_custom_version: [0_u8; 8usize],
6081        os_custom_version: [0_u8; 8usize],
6082        uid2: [0_u8; 18usize],
6083    };
6084    #[cfg(feature = "arbitrary")]
6085    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6086        use arbitrary::{Arbitrary, Unstructured};
6087        let mut buf = [0u8; 1024];
6088        rng.fill_bytes(&mut buf);
6089        let mut unstructured = Unstructured::new(&buf);
6090        Self::arbitrary(&mut unstructured).unwrap_or_default()
6091    }
6092}
6093impl Default for AUTOPILOT_VERSION_DATA {
6094    fn default() -> Self {
6095        Self::DEFAULT.clone()
6096    }
6097}
6098impl MessageData for AUTOPILOT_VERSION_DATA {
6099    type Message = MavMessage;
6100    const ID: u32 = 148u32;
6101    const NAME: &'static str = "AUTOPILOT_VERSION";
6102    const EXTRA_CRC: u8 = 178u8;
6103    const ENCODED_LEN: usize = 78usize;
6104    fn deser(
6105        _version: MavlinkVersion,
6106        __input: &[u8],
6107    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6108        let avail_len = __input.len();
6109        let mut payload_buf = [0; Self::ENCODED_LEN];
6110        let mut buf = if avail_len < Self::ENCODED_LEN {
6111            payload_buf[0..avail_len].copy_from_slice(__input);
6112            Bytes::new(&payload_buf)
6113        } else {
6114            Bytes::new(__input)
6115        };
6116        let mut __struct = Self::default();
6117        let tmp = buf.get_u64_le();
6118        __struct.capabilities = MavProtocolCapability::from_bits(
6119            tmp & MavProtocolCapability::all().bits(),
6120        )
6121        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6122            flag_type: "MavProtocolCapability",
6123            value: tmp as u32,
6124        })?;
6125        __struct.uid = buf.get_u64_le();
6126        __struct.flight_sw_version = buf.get_u32_le();
6127        __struct.middleware_sw_version = buf.get_u32_le();
6128        __struct.os_sw_version = buf.get_u32_le();
6129        __struct.board_version = buf.get_u32_le();
6130        __struct.vendor_id = buf.get_u16_le();
6131        __struct.product_id = buf.get_u16_le();
6132        for v in &mut __struct.flight_custom_version {
6133            let val = buf.get_u8();
6134            *v = val;
6135        }
6136        for v in &mut __struct.middleware_custom_version {
6137            let val = buf.get_u8();
6138            *v = val;
6139        }
6140        for v in &mut __struct.os_custom_version {
6141            let val = buf.get_u8();
6142            *v = val;
6143        }
6144        for v in &mut __struct.uid2 {
6145            let val = buf.get_u8();
6146            *v = val;
6147        }
6148        Ok(__struct)
6149    }
6150    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6151        let mut __tmp = BytesMut::new(bytes);
6152        #[allow(clippy::absurd_extreme_comparisons)]
6153        #[allow(unused_comparisons)]
6154        if __tmp.remaining() < Self::ENCODED_LEN {
6155            panic!(
6156                "buffer is too small (need {} bytes, but got {})",
6157                Self::ENCODED_LEN,
6158                __tmp.remaining(),
6159            )
6160        }
6161        __tmp.put_u64_le(self.capabilities.bits());
6162        __tmp.put_u64_le(self.uid);
6163        __tmp.put_u32_le(self.flight_sw_version);
6164        __tmp.put_u32_le(self.middleware_sw_version);
6165        __tmp.put_u32_le(self.os_sw_version);
6166        __tmp.put_u32_le(self.board_version);
6167        __tmp.put_u16_le(self.vendor_id);
6168        __tmp.put_u16_le(self.product_id);
6169        for val in &self.flight_custom_version {
6170            __tmp.put_u8(*val);
6171        }
6172        for val in &self.middleware_custom_version {
6173            __tmp.put_u8(*val);
6174        }
6175        for val in &self.os_custom_version {
6176            __tmp.put_u8(*val);
6177        }
6178        for val in &self.uid2 {
6179            __tmp.put_u8(*val);
6180        }
6181        if matches!(version, MavlinkVersion::V2) {
6182            let len = __tmp.len();
6183            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6184        } else {
6185            __tmp.len()
6186        }
6187    }
6188}
6189#[doc = "id: 435"]
6190#[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
6191#[derive(Debug, Clone, PartialEq)]
6192#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6193#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6194pub struct AVAILABLE_MODES_DATA {
6195    #[doc = "A bitfield for use for autopilot-specific flags"]
6196    pub custom_mode: u32,
6197    #[doc = "Mode properties."]
6198    pub properties: MavModeProperty,
6199    #[doc = "The total number of available modes for the current vehicle type."]
6200    pub number_modes: u8,
6201    #[doc = "The current mode index within number_modes, indexed from 1. The index is not guaranteed to be persistent, and may change between reboots or if the set of modes change."]
6202    pub mode_index: u8,
6203    #[doc = "Standard mode."]
6204    pub standard_mode: MavStandardMode,
6205    #[doc = "Name of custom mode, with null termination character. Should be omitted for standard modes."]
6206    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6207    pub mode_name: [u8; 35],
6208}
6209impl AVAILABLE_MODES_DATA {
6210    pub const ENCODED_LEN: usize = 46usize;
6211    pub const DEFAULT: Self = Self {
6212        custom_mode: 0_u32,
6213        properties: MavModeProperty::DEFAULT,
6214        number_modes: 0_u8,
6215        mode_index: 0_u8,
6216        standard_mode: MavStandardMode::DEFAULT,
6217        mode_name: [0_u8; 35usize],
6218    };
6219    #[cfg(feature = "arbitrary")]
6220    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6221        use arbitrary::{Arbitrary, Unstructured};
6222        let mut buf = [0u8; 1024];
6223        rng.fill_bytes(&mut buf);
6224        let mut unstructured = Unstructured::new(&buf);
6225        Self::arbitrary(&mut unstructured).unwrap_or_default()
6226    }
6227}
6228impl Default for AVAILABLE_MODES_DATA {
6229    fn default() -> Self {
6230        Self::DEFAULT.clone()
6231    }
6232}
6233impl MessageData for AVAILABLE_MODES_DATA {
6234    type Message = MavMessage;
6235    const ID: u32 = 435u32;
6236    const NAME: &'static str = "AVAILABLE_MODES";
6237    const EXTRA_CRC: u8 = 134u8;
6238    const ENCODED_LEN: usize = 46usize;
6239    fn deser(
6240        _version: MavlinkVersion,
6241        __input: &[u8],
6242    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6243        let avail_len = __input.len();
6244        let mut payload_buf = [0; Self::ENCODED_LEN];
6245        let mut buf = if avail_len < Self::ENCODED_LEN {
6246            payload_buf[0..avail_len].copy_from_slice(__input);
6247            Bytes::new(&payload_buf)
6248        } else {
6249            Bytes::new(__input)
6250        };
6251        let mut __struct = Self::default();
6252        __struct.custom_mode = buf.get_u32_le();
6253        let tmp = buf.get_u32_le();
6254        __struct.properties = MavModeProperty::from_bits(tmp & MavModeProperty::all().bits())
6255            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6256                flag_type: "MavModeProperty",
6257                value: tmp as u32,
6258            })?;
6259        __struct.number_modes = buf.get_u8();
6260        __struct.mode_index = buf.get_u8();
6261        let tmp = buf.get_u8();
6262        __struct.standard_mode =
6263            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6264                enum_type: "MavStandardMode",
6265                value: tmp as u32,
6266            })?;
6267        for v in &mut __struct.mode_name {
6268            let val = buf.get_u8();
6269            *v = val;
6270        }
6271        Ok(__struct)
6272    }
6273    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6274        let mut __tmp = BytesMut::new(bytes);
6275        #[allow(clippy::absurd_extreme_comparisons)]
6276        #[allow(unused_comparisons)]
6277        if __tmp.remaining() < Self::ENCODED_LEN {
6278            panic!(
6279                "buffer is too small (need {} bytes, but got {})",
6280                Self::ENCODED_LEN,
6281                __tmp.remaining(),
6282            )
6283        }
6284        __tmp.put_u32_le(self.custom_mode);
6285        __tmp.put_u32_le(self.properties.bits());
6286        __tmp.put_u8(self.number_modes);
6287        __tmp.put_u8(self.mode_index);
6288        __tmp.put_u8(self.standard_mode as u8);
6289        for val in &self.mode_name {
6290            __tmp.put_u8(*val);
6291        }
6292        if matches!(version, MavlinkVersion::V2) {
6293            let len = __tmp.len();
6294            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6295        } else {
6296            __tmp.len()
6297        }
6298    }
6299}
6300#[doc = "id: 437"]
6301#[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
6302#[derive(Debug, Clone, PartialEq)]
6303#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6304#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6305pub struct AVAILABLE_MODES_MONITOR_DATA {
6306    #[doc = "Sequence number. The value iterates sequentially whenever AVAILABLE_MODES changes (e.g. support for a new mode is added/removed dynamically)."]
6307    pub seq: u8,
6308}
6309impl AVAILABLE_MODES_MONITOR_DATA {
6310    pub const ENCODED_LEN: usize = 1usize;
6311    pub const DEFAULT: Self = Self { seq: 0_u8 };
6312    #[cfg(feature = "arbitrary")]
6313    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6314        use arbitrary::{Arbitrary, Unstructured};
6315        let mut buf = [0u8; 1024];
6316        rng.fill_bytes(&mut buf);
6317        let mut unstructured = Unstructured::new(&buf);
6318        Self::arbitrary(&mut unstructured).unwrap_or_default()
6319    }
6320}
6321impl Default for AVAILABLE_MODES_MONITOR_DATA {
6322    fn default() -> Self {
6323        Self::DEFAULT.clone()
6324    }
6325}
6326impl MessageData for AVAILABLE_MODES_MONITOR_DATA {
6327    type Message = MavMessage;
6328    const ID: u32 = 437u32;
6329    const NAME: &'static str = "AVAILABLE_MODES_MONITOR";
6330    const EXTRA_CRC: u8 = 30u8;
6331    const ENCODED_LEN: usize = 1usize;
6332    fn deser(
6333        _version: MavlinkVersion,
6334        __input: &[u8],
6335    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6336        let avail_len = __input.len();
6337        let mut payload_buf = [0; Self::ENCODED_LEN];
6338        let mut buf = if avail_len < Self::ENCODED_LEN {
6339            payload_buf[0..avail_len].copy_from_slice(__input);
6340            Bytes::new(&payload_buf)
6341        } else {
6342            Bytes::new(__input)
6343        };
6344        let mut __struct = Self::default();
6345        __struct.seq = buf.get_u8();
6346        Ok(__struct)
6347    }
6348    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6349        let mut __tmp = BytesMut::new(bytes);
6350        #[allow(clippy::absurd_extreme_comparisons)]
6351        #[allow(unused_comparisons)]
6352        if __tmp.remaining() < Self::ENCODED_LEN {
6353            panic!(
6354                "buffer is too small (need {} bytes, but got {})",
6355                Self::ENCODED_LEN,
6356                __tmp.remaining(),
6357            )
6358        }
6359        __tmp.put_u8(self.seq);
6360        if matches!(version, MavlinkVersion::V2) {
6361            let len = __tmp.len();
6362            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6363        } else {
6364            __tmp.len()
6365        }
6366    }
6367}
6368#[doc = "id: 372"]
6369#[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
6370#[derive(Debug, Clone, PartialEq)]
6371#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6372#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6373pub struct BATTERY_INFO_DATA {
6374    #[doc = "Minimum per-cell voltage when discharging. 0: field not provided."]
6375    pub discharge_minimum_voltage: f32,
6376    #[doc = "Minimum per-cell voltage when charging. 0: field not provided."]
6377    pub charging_minimum_voltage: f32,
6378    #[doc = "Minimum per-cell voltage when resting. 0: field not provided."]
6379    pub resting_minimum_voltage: f32,
6380    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
6381    pub charging_maximum_voltage: f32,
6382    #[doc = "Maximum pack continuous charge current. 0: field not provided."]
6383    pub charging_maximum_current: f32,
6384    #[doc = "Battery nominal voltage. Used for conversion between Wh and Ah. 0: field not provided."]
6385    pub nominal_voltage: f32,
6386    #[doc = "Maximum pack discharge current. 0: field not provided."]
6387    pub discharge_maximum_current: f32,
6388    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
6389    pub discharge_maximum_burst_current: f32,
6390    #[doc = "Fully charged design capacity. 0: field not provided."]
6391    pub design_capacity: f32,
6392    #[doc = "Predicted battery capacity when fully charged (accounting for battery degradation). NAN: field not provided."]
6393    pub full_charge_capacity: f32,
6394    #[doc = "Lifetime count of the number of charge/discharge cycles (<https://en.wikipedia.org/wiki/Charge_cycle>). UINT16_MAX: field not provided."]
6395    pub cycle_count: u16,
6396    #[doc = "Battery weight. 0: field not provided."]
6397    pub weight: u16,
6398    #[doc = "Battery ID"]
6399    pub id: u8,
6400    #[doc = "Function of the battery."]
6401    pub battery_function: MavBatteryFunction,
6402    #[doc = "Type (chemistry) of the battery."]
6403    pub mavtype: MavBatteryType,
6404    #[doc = "State of Health (SOH) estimate. Typically 100% at the time of manufacture and will decrease over time and use. -1: field not provided."]
6405    pub state_of_health: u8,
6406    #[doc = "Number of battery cells in series. 0: field not provided."]
6407    pub cells_in_series: u8,
6408    #[doc = "Manufacture date (DDMMYYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
6409    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6410    pub manufacture_date: [u8; 9],
6411    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
6412    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6413    pub serial_number: [u8; 32],
6414    #[doc = "Battery device name. Formatted as manufacturer name then product name, separated with an underscore (in ASCII characters), 0 terminated. All 0: field not provided."]
6415    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6416    pub name: [u8; 50],
6417}
6418impl BATTERY_INFO_DATA {
6419    pub const ENCODED_LEN: usize = 140usize;
6420    pub const DEFAULT: Self = Self {
6421        discharge_minimum_voltage: 0.0_f32,
6422        charging_minimum_voltage: 0.0_f32,
6423        resting_minimum_voltage: 0.0_f32,
6424        charging_maximum_voltage: 0.0_f32,
6425        charging_maximum_current: 0.0_f32,
6426        nominal_voltage: 0.0_f32,
6427        discharge_maximum_current: 0.0_f32,
6428        discharge_maximum_burst_current: 0.0_f32,
6429        design_capacity: 0.0_f32,
6430        full_charge_capacity: 0.0_f32,
6431        cycle_count: 0_u16,
6432        weight: 0_u16,
6433        id: 0_u8,
6434        battery_function: MavBatteryFunction::DEFAULT,
6435        mavtype: MavBatteryType::DEFAULT,
6436        state_of_health: 0_u8,
6437        cells_in_series: 0_u8,
6438        manufacture_date: [0_u8; 9usize],
6439        serial_number: [0_u8; 32usize],
6440        name: [0_u8; 50usize],
6441    };
6442    #[cfg(feature = "arbitrary")]
6443    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6444        use arbitrary::{Arbitrary, Unstructured};
6445        let mut buf = [0u8; 1024];
6446        rng.fill_bytes(&mut buf);
6447        let mut unstructured = Unstructured::new(&buf);
6448        Self::arbitrary(&mut unstructured).unwrap_or_default()
6449    }
6450}
6451impl Default for BATTERY_INFO_DATA {
6452    fn default() -> Self {
6453        Self::DEFAULT.clone()
6454    }
6455}
6456impl MessageData for BATTERY_INFO_DATA {
6457    type Message = MavMessage;
6458    const ID: u32 = 372u32;
6459    const NAME: &'static str = "BATTERY_INFO";
6460    const EXTRA_CRC: u8 = 26u8;
6461    const ENCODED_LEN: usize = 140usize;
6462    fn deser(
6463        _version: MavlinkVersion,
6464        __input: &[u8],
6465    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6466        let avail_len = __input.len();
6467        let mut payload_buf = [0; Self::ENCODED_LEN];
6468        let mut buf = if avail_len < Self::ENCODED_LEN {
6469            payload_buf[0..avail_len].copy_from_slice(__input);
6470            Bytes::new(&payload_buf)
6471        } else {
6472            Bytes::new(__input)
6473        };
6474        let mut __struct = Self::default();
6475        __struct.discharge_minimum_voltage = buf.get_f32_le();
6476        __struct.charging_minimum_voltage = buf.get_f32_le();
6477        __struct.resting_minimum_voltage = buf.get_f32_le();
6478        __struct.charging_maximum_voltage = buf.get_f32_le();
6479        __struct.charging_maximum_current = buf.get_f32_le();
6480        __struct.nominal_voltage = buf.get_f32_le();
6481        __struct.discharge_maximum_current = buf.get_f32_le();
6482        __struct.discharge_maximum_burst_current = buf.get_f32_le();
6483        __struct.design_capacity = buf.get_f32_le();
6484        __struct.full_charge_capacity = buf.get_f32_le();
6485        __struct.cycle_count = buf.get_u16_le();
6486        __struct.weight = buf.get_u16_le();
6487        __struct.id = buf.get_u8();
6488        let tmp = buf.get_u8();
6489        __struct.battery_function =
6490            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6491                enum_type: "MavBatteryFunction",
6492                value: tmp as u32,
6493            })?;
6494        let tmp = buf.get_u8();
6495        __struct.mavtype =
6496            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6497                enum_type: "MavBatteryType",
6498                value: tmp as u32,
6499            })?;
6500        __struct.state_of_health = buf.get_u8();
6501        __struct.cells_in_series = buf.get_u8();
6502        for v in &mut __struct.manufacture_date {
6503            let val = buf.get_u8();
6504            *v = val;
6505        }
6506        for v in &mut __struct.serial_number {
6507            let val = buf.get_u8();
6508            *v = val;
6509        }
6510        for v in &mut __struct.name {
6511            let val = buf.get_u8();
6512            *v = val;
6513        }
6514        Ok(__struct)
6515    }
6516    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6517        let mut __tmp = BytesMut::new(bytes);
6518        #[allow(clippy::absurd_extreme_comparisons)]
6519        #[allow(unused_comparisons)]
6520        if __tmp.remaining() < Self::ENCODED_LEN {
6521            panic!(
6522                "buffer is too small (need {} bytes, but got {})",
6523                Self::ENCODED_LEN,
6524                __tmp.remaining(),
6525            )
6526        }
6527        __tmp.put_f32_le(self.discharge_minimum_voltage);
6528        __tmp.put_f32_le(self.charging_minimum_voltage);
6529        __tmp.put_f32_le(self.resting_minimum_voltage);
6530        __tmp.put_f32_le(self.charging_maximum_voltage);
6531        __tmp.put_f32_le(self.charging_maximum_current);
6532        __tmp.put_f32_le(self.nominal_voltage);
6533        __tmp.put_f32_le(self.discharge_maximum_current);
6534        __tmp.put_f32_le(self.discharge_maximum_burst_current);
6535        __tmp.put_f32_le(self.design_capacity);
6536        __tmp.put_f32_le(self.full_charge_capacity);
6537        __tmp.put_u16_le(self.cycle_count);
6538        __tmp.put_u16_le(self.weight);
6539        __tmp.put_u8(self.id);
6540        __tmp.put_u8(self.battery_function as u8);
6541        __tmp.put_u8(self.mavtype as u8);
6542        __tmp.put_u8(self.state_of_health);
6543        __tmp.put_u8(self.cells_in_series);
6544        for val in &self.manufacture_date {
6545            __tmp.put_u8(*val);
6546        }
6547        for val in &self.serial_number {
6548            __tmp.put_u8(*val);
6549        }
6550        for val in &self.name {
6551            __tmp.put_u8(*val);
6552        }
6553        if matches!(version, MavlinkVersion::V2) {
6554            let len = __tmp.len();
6555            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6556        } else {
6557            __tmp.len()
6558        }
6559    }
6560}
6561#[doc = "id: 147"]
6562#[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
6563#[derive(Debug, Clone, PartialEq)]
6564#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6565#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6566pub struct BATTERY_STATUS_DATA {
6567    #[doc = "Consumed charge, -1: autopilot does not provide consumption estimate"]
6568    pub current_consumed: i32,
6569    #[doc = "Consumed energy, -1: autopilot does not provide energy consumption estimate"]
6570    pub energy_consumed: i32,
6571    #[doc = "Temperature of the battery. INT16_MAX for unknown temperature."]
6572    pub temperature: i16,
6573    #[doc = "Battery voltage of cells 1 to 10 (see voltages_ext for cells 11-14). Cells in this field above the valid cell count for this battery should have the UINT16_MAX value. If individual cell voltages are unknown or not measured for this battery, then the overall battery voltage should be filled in cell 0, with all others set to UINT16_MAX. If the voltage of the battery is greater than (UINT16_MAX - 1), then cell 0 should be set to (UINT16_MAX - 1), and cell 1 to the remaining voltage. This can be extended to multiple cells if the total voltage is greater than 2 * (UINT16_MAX - 1)."]
6574    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6575    pub voltages: [u16; 10],
6576    #[doc = "Battery current, -1: autopilot does not measure the current"]
6577    pub current_battery: i16,
6578    #[doc = "Battery ID"]
6579    pub id: u8,
6580    #[doc = "Function of the battery"]
6581    pub battery_function: MavBatteryFunction,
6582    #[doc = "Type (chemistry) of the battery"]
6583    pub mavtype: MavBatteryType,
6584    #[doc = "Remaining battery energy. Values: [0-100], -1: autopilot does not estimate the remaining battery."]
6585    pub battery_remaining: i8,
6586    #[doc = "Remaining battery time, 0: autopilot does not provide remaining battery time estimate"]
6587    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6588    pub time_remaining: i32,
6589    #[doc = "State for extent of discharge, provided by autopilot for warning or external reactions"]
6590    #[cfg_attr(feature = "serde", serde(default))]
6591    pub charge_state: MavBatteryChargeState,
6592    #[doc = "Battery voltages for cells 11 to 14. Cells above the valid cell count for this battery should have a value of 0, where zero indicates not supported (note, this is different than for the voltages field and allows empty byte truncation). If the measured value is 0 then 1 should be sent instead."]
6593    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6594    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6595    pub voltages_ext: [u16; 4],
6596    #[doc = "Battery mode. Default (0) is that battery mode reporting is not supported or battery is in normal-use mode."]
6597    #[cfg_attr(feature = "serde", serde(default))]
6598    pub mode: MavBatteryMode,
6599    #[doc = "Fault/health indications. These should be set when charge_state is MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY (if not, fault reporting is not supported)."]
6600    #[cfg_attr(feature = "serde", serde(default))]
6601    pub fault_bitmask: MavBatteryFault,
6602}
6603impl BATTERY_STATUS_DATA {
6604    pub const ENCODED_LEN: usize = 54usize;
6605    pub const DEFAULT: Self = Self {
6606        current_consumed: 0_i32,
6607        energy_consumed: 0_i32,
6608        temperature: 0_i16,
6609        voltages: [0_u16; 10usize],
6610        current_battery: 0_i16,
6611        id: 0_u8,
6612        battery_function: MavBatteryFunction::DEFAULT,
6613        mavtype: MavBatteryType::DEFAULT,
6614        battery_remaining: 0_i8,
6615        time_remaining: 0_i32,
6616        charge_state: MavBatteryChargeState::DEFAULT,
6617        voltages_ext: [0_u16; 4usize],
6618        mode: MavBatteryMode::DEFAULT,
6619        fault_bitmask: MavBatteryFault::DEFAULT,
6620    };
6621    #[cfg(feature = "arbitrary")]
6622    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6623        use arbitrary::{Arbitrary, Unstructured};
6624        let mut buf = [0u8; 1024];
6625        rng.fill_bytes(&mut buf);
6626        let mut unstructured = Unstructured::new(&buf);
6627        Self::arbitrary(&mut unstructured).unwrap_or_default()
6628    }
6629}
6630impl Default for BATTERY_STATUS_DATA {
6631    fn default() -> Self {
6632        Self::DEFAULT.clone()
6633    }
6634}
6635impl MessageData for BATTERY_STATUS_DATA {
6636    type Message = MavMessage;
6637    const ID: u32 = 147u32;
6638    const NAME: &'static str = "BATTERY_STATUS";
6639    const EXTRA_CRC: u8 = 154u8;
6640    const ENCODED_LEN: usize = 54usize;
6641    fn deser(
6642        _version: MavlinkVersion,
6643        __input: &[u8],
6644    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6645        let avail_len = __input.len();
6646        let mut payload_buf = [0; Self::ENCODED_LEN];
6647        let mut buf = if avail_len < Self::ENCODED_LEN {
6648            payload_buf[0..avail_len].copy_from_slice(__input);
6649            Bytes::new(&payload_buf)
6650        } else {
6651            Bytes::new(__input)
6652        };
6653        let mut __struct = Self::default();
6654        __struct.current_consumed = buf.get_i32_le();
6655        __struct.energy_consumed = buf.get_i32_le();
6656        __struct.temperature = buf.get_i16_le();
6657        for v in &mut __struct.voltages {
6658            let val = buf.get_u16_le();
6659            *v = val;
6660        }
6661        __struct.current_battery = buf.get_i16_le();
6662        __struct.id = buf.get_u8();
6663        let tmp = buf.get_u8();
6664        __struct.battery_function =
6665            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6666                enum_type: "MavBatteryFunction",
6667                value: tmp as u32,
6668            })?;
6669        let tmp = buf.get_u8();
6670        __struct.mavtype =
6671            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6672                enum_type: "MavBatteryType",
6673                value: tmp as u32,
6674            })?;
6675        __struct.battery_remaining = buf.get_i8();
6676        __struct.time_remaining = buf.get_i32_le();
6677        let tmp = buf.get_u8();
6678        __struct.charge_state =
6679            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6680                enum_type: "MavBatteryChargeState",
6681                value: tmp as u32,
6682            })?;
6683        for v in &mut __struct.voltages_ext {
6684            let val = buf.get_u16_le();
6685            *v = val;
6686        }
6687        let tmp = buf.get_u8();
6688        __struct.mode =
6689            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6690                enum_type: "MavBatteryMode",
6691                value: tmp as u32,
6692            })?;
6693        let tmp = buf.get_u32_le();
6694        __struct.fault_bitmask = MavBatteryFault::from_bits(tmp & MavBatteryFault::all().bits())
6695            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6696                flag_type: "MavBatteryFault",
6697                value: tmp as u32,
6698            })?;
6699        Ok(__struct)
6700    }
6701    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6702        let mut __tmp = BytesMut::new(bytes);
6703        #[allow(clippy::absurd_extreme_comparisons)]
6704        #[allow(unused_comparisons)]
6705        if __tmp.remaining() < Self::ENCODED_LEN {
6706            panic!(
6707                "buffer is too small (need {} bytes, but got {})",
6708                Self::ENCODED_LEN,
6709                __tmp.remaining(),
6710            )
6711        }
6712        __tmp.put_i32_le(self.current_consumed);
6713        __tmp.put_i32_le(self.energy_consumed);
6714        __tmp.put_i16_le(self.temperature);
6715        for val in &self.voltages {
6716            __tmp.put_u16_le(*val);
6717        }
6718        __tmp.put_i16_le(self.current_battery);
6719        __tmp.put_u8(self.id);
6720        __tmp.put_u8(self.battery_function as u8);
6721        __tmp.put_u8(self.mavtype as u8);
6722        __tmp.put_i8(self.battery_remaining);
6723        __tmp.put_i32_le(self.time_remaining);
6724        __tmp.put_u8(self.charge_state as u8);
6725        for val in &self.voltages_ext {
6726            __tmp.put_u16_le(*val);
6727        }
6728        __tmp.put_u8(self.mode as u8);
6729        __tmp.put_u32_le(self.fault_bitmask.bits());
6730        if matches!(version, MavlinkVersion::V2) {
6731            let len = __tmp.len();
6732            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6733        } else {
6734            __tmp.len()
6735        }
6736    }
6737}
6738#[doc = "id: 257"]
6739#[doc = "Report button state change."]
6740#[derive(Debug, Clone, PartialEq)]
6741#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6742#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6743pub struct BUTTON_CHANGE_DATA {
6744    #[doc = "Timestamp (time since system boot)."]
6745    pub time_boot_ms: u32,
6746    #[doc = "Time of last change of button state."]
6747    pub last_change_ms: u32,
6748    #[doc = "Bitmap for state of buttons."]
6749    pub state: u8,
6750}
6751impl BUTTON_CHANGE_DATA {
6752    pub const ENCODED_LEN: usize = 9usize;
6753    pub const DEFAULT: Self = Self {
6754        time_boot_ms: 0_u32,
6755        last_change_ms: 0_u32,
6756        state: 0_u8,
6757    };
6758    #[cfg(feature = "arbitrary")]
6759    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6760        use arbitrary::{Arbitrary, Unstructured};
6761        let mut buf = [0u8; 1024];
6762        rng.fill_bytes(&mut buf);
6763        let mut unstructured = Unstructured::new(&buf);
6764        Self::arbitrary(&mut unstructured).unwrap_or_default()
6765    }
6766}
6767impl Default for BUTTON_CHANGE_DATA {
6768    fn default() -> Self {
6769        Self::DEFAULT.clone()
6770    }
6771}
6772impl MessageData for BUTTON_CHANGE_DATA {
6773    type Message = MavMessage;
6774    const ID: u32 = 257u32;
6775    const NAME: &'static str = "BUTTON_CHANGE";
6776    const EXTRA_CRC: u8 = 131u8;
6777    const ENCODED_LEN: usize = 9usize;
6778    fn deser(
6779        _version: MavlinkVersion,
6780        __input: &[u8],
6781    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6782        let avail_len = __input.len();
6783        let mut payload_buf = [0; Self::ENCODED_LEN];
6784        let mut buf = if avail_len < Self::ENCODED_LEN {
6785            payload_buf[0..avail_len].copy_from_slice(__input);
6786            Bytes::new(&payload_buf)
6787        } else {
6788            Bytes::new(__input)
6789        };
6790        let mut __struct = Self::default();
6791        __struct.time_boot_ms = buf.get_u32_le();
6792        __struct.last_change_ms = buf.get_u32_le();
6793        __struct.state = buf.get_u8();
6794        Ok(__struct)
6795    }
6796    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6797        let mut __tmp = BytesMut::new(bytes);
6798        #[allow(clippy::absurd_extreme_comparisons)]
6799        #[allow(unused_comparisons)]
6800        if __tmp.remaining() < Self::ENCODED_LEN {
6801            panic!(
6802                "buffer is too small (need {} bytes, but got {})",
6803                Self::ENCODED_LEN,
6804                __tmp.remaining(),
6805            )
6806        }
6807        __tmp.put_u32_le(self.time_boot_ms);
6808        __tmp.put_u32_le(self.last_change_ms);
6809        __tmp.put_u8(self.state);
6810        if matches!(version, MavlinkVersion::V2) {
6811            let len = __tmp.len();
6812            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6813        } else {
6814            __tmp.len()
6815        }
6816    }
6817}
6818#[doc = "id: 262"]
6819#[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
6820#[derive(Debug, Clone, PartialEq)]
6821#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6822#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6823pub struct CAMERA_CAPTURE_STATUS_DATA {
6824    #[doc = "Timestamp (time since system boot)."]
6825    pub time_boot_ms: u32,
6826    #[doc = "Image capture interval"]
6827    pub image_interval: f32,
6828    #[doc = "Elapsed time since recording started (0: Not supported/available). A GCS should compute recording time and use non-zero values of this field to correct any discrepancy."]
6829    pub recording_time_ms: u32,
6830    #[doc = "Available storage capacity."]
6831    pub available_capacity: f32,
6832    #[doc = "Current status of image capturing (0: idle, 1: capture in progress, 2: interval set but idle, 3: interval set and capture in progress)"]
6833    pub image_status: u8,
6834    #[doc = "Current status of video capturing (0: idle, 1: capture in progress)"]
6835    pub video_status: u8,
6836    #[doc = "Total number of images captured ('forever', or until reset using MAV_CMD_STORAGE_FORMAT)."]
6837    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6838    pub image_count: i32,
6839    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
6840    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6841    pub camera_device_id: u8,
6842}
6843impl CAMERA_CAPTURE_STATUS_DATA {
6844    pub const ENCODED_LEN: usize = 23usize;
6845    pub const DEFAULT: Self = Self {
6846        time_boot_ms: 0_u32,
6847        image_interval: 0.0_f32,
6848        recording_time_ms: 0_u32,
6849        available_capacity: 0.0_f32,
6850        image_status: 0_u8,
6851        video_status: 0_u8,
6852        image_count: 0_i32,
6853        camera_device_id: 0_u8,
6854    };
6855    #[cfg(feature = "arbitrary")]
6856    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6857        use arbitrary::{Arbitrary, Unstructured};
6858        let mut buf = [0u8; 1024];
6859        rng.fill_bytes(&mut buf);
6860        let mut unstructured = Unstructured::new(&buf);
6861        Self::arbitrary(&mut unstructured).unwrap_or_default()
6862    }
6863}
6864impl Default for CAMERA_CAPTURE_STATUS_DATA {
6865    fn default() -> Self {
6866        Self::DEFAULT.clone()
6867    }
6868}
6869impl MessageData for CAMERA_CAPTURE_STATUS_DATA {
6870    type Message = MavMessage;
6871    const ID: u32 = 262u32;
6872    const NAME: &'static str = "CAMERA_CAPTURE_STATUS";
6873    const EXTRA_CRC: u8 = 12u8;
6874    const ENCODED_LEN: usize = 23usize;
6875    fn deser(
6876        _version: MavlinkVersion,
6877        __input: &[u8],
6878    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6879        let avail_len = __input.len();
6880        let mut payload_buf = [0; Self::ENCODED_LEN];
6881        let mut buf = if avail_len < Self::ENCODED_LEN {
6882            payload_buf[0..avail_len].copy_from_slice(__input);
6883            Bytes::new(&payload_buf)
6884        } else {
6885            Bytes::new(__input)
6886        };
6887        let mut __struct = Self::default();
6888        __struct.time_boot_ms = buf.get_u32_le();
6889        __struct.image_interval = buf.get_f32_le();
6890        __struct.recording_time_ms = buf.get_u32_le();
6891        __struct.available_capacity = buf.get_f32_le();
6892        __struct.image_status = buf.get_u8();
6893        __struct.video_status = buf.get_u8();
6894        __struct.image_count = buf.get_i32_le();
6895        __struct.camera_device_id = buf.get_u8();
6896        Ok(__struct)
6897    }
6898    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6899        let mut __tmp = BytesMut::new(bytes);
6900        #[allow(clippy::absurd_extreme_comparisons)]
6901        #[allow(unused_comparisons)]
6902        if __tmp.remaining() < Self::ENCODED_LEN {
6903            panic!(
6904                "buffer is too small (need {} bytes, but got {})",
6905                Self::ENCODED_LEN,
6906                __tmp.remaining(),
6907            )
6908        }
6909        __tmp.put_u32_le(self.time_boot_ms);
6910        __tmp.put_f32_le(self.image_interval);
6911        __tmp.put_u32_le(self.recording_time_ms);
6912        __tmp.put_f32_le(self.available_capacity);
6913        __tmp.put_u8(self.image_status);
6914        __tmp.put_u8(self.video_status);
6915        __tmp.put_i32_le(self.image_count);
6916        __tmp.put_u8(self.camera_device_id);
6917        if matches!(version, MavlinkVersion::V2) {
6918            let len = __tmp.len();
6919            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6920        } else {
6921            __tmp.len()
6922        }
6923    }
6924}
6925#[doc = "id: 271"]
6926#[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
6927#[derive(Debug, Clone, PartialEq)]
6928#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6929#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6930pub struct CAMERA_FOV_STATUS_DATA {
6931    #[doc = "Timestamp (time since system boot)."]
6932    pub time_boot_ms: u32,
6933    #[doc = "Latitude of camera (INT32_MAX if unknown)."]
6934    pub lat_camera: i32,
6935    #[doc = "Longitude of camera (INT32_MAX if unknown)."]
6936    pub lon_camera: i32,
6937    #[doc = "Altitude (MSL) of camera (INT32_MAX if unknown)."]
6938    pub alt_camera: i32,
6939    #[doc = "Latitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
6940    pub lat_image: i32,
6941    #[doc = "Longitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
6942    pub lon_image: i32,
6943    #[doc = "Altitude (MSL) of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
6944    pub alt_image: i32,
6945    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
6946    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6947    pub q: [f32; 4],
6948    #[doc = "Horizontal field of view (NaN if unknown)."]
6949    pub hfov: f32,
6950    #[doc = "Vertical field of view (NaN if unknown)."]
6951    pub vfov: f32,
6952    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
6953    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6954    pub camera_device_id: u8,
6955}
6956impl CAMERA_FOV_STATUS_DATA {
6957    pub const ENCODED_LEN: usize = 53usize;
6958    pub const DEFAULT: Self = Self {
6959        time_boot_ms: 0_u32,
6960        lat_camera: 0_i32,
6961        lon_camera: 0_i32,
6962        alt_camera: 0_i32,
6963        lat_image: 0_i32,
6964        lon_image: 0_i32,
6965        alt_image: 0_i32,
6966        q: [0.0_f32; 4usize],
6967        hfov: 0.0_f32,
6968        vfov: 0.0_f32,
6969        camera_device_id: 0_u8,
6970    };
6971    #[cfg(feature = "arbitrary")]
6972    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6973        use arbitrary::{Arbitrary, Unstructured};
6974        let mut buf = [0u8; 1024];
6975        rng.fill_bytes(&mut buf);
6976        let mut unstructured = Unstructured::new(&buf);
6977        Self::arbitrary(&mut unstructured).unwrap_or_default()
6978    }
6979}
6980impl Default for CAMERA_FOV_STATUS_DATA {
6981    fn default() -> Self {
6982        Self::DEFAULT.clone()
6983    }
6984}
6985impl MessageData for CAMERA_FOV_STATUS_DATA {
6986    type Message = MavMessage;
6987    const ID: u32 = 271u32;
6988    const NAME: &'static str = "CAMERA_FOV_STATUS";
6989    const EXTRA_CRC: u8 = 22u8;
6990    const ENCODED_LEN: usize = 53usize;
6991    fn deser(
6992        _version: MavlinkVersion,
6993        __input: &[u8],
6994    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6995        let avail_len = __input.len();
6996        let mut payload_buf = [0; Self::ENCODED_LEN];
6997        let mut buf = if avail_len < Self::ENCODED_LEN {
6998            payload_buf[0..avail_len].copy_from_slice(__input);
6999            Bytes::new(&payload_buf)
7000        } else {
7001            Bytes::new(__input)
7002        };
7003        let mut __struct = Self::default();
7004        __struct.time_boot_ms = buf.get_u32_le();
7005        __struct.lat_camera = buf.get_i32_le();
7006        __struct.lon_camera = buf.get_i32_le();
7007        __struct.alt_camera = buf.get_i32_le();
7008        __struct.lat_image = buf.get_i32_le();
7009        __struct.lon_image = buf.get_i32_le();
7010        __struct.alt_image = buf.get_i32_le();
7011        for v in &mut __struct.q {
7012            let val = buf.get_f32_le();
7013            *v = val;
7014        }
7015        __struct.hfov = buf.get_f32_le();
7016        __struct.vfov = buf.get_f32_le();
7017        __struct.camera_device_id = buf.get_u8();
7018        Ok(__struct)
7019    }
7020    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7021        let mut __tmp = BytesMut::new(bytes);
7022        #[allow(clippy::absurd_extreme_comparisons)]
7023        #[allow(unused_comparisons)]
7024        if __tmp.remaining() < Self::ENCODED_LEN {
7025            panic!(
7026                "buffer is too small (need {} bytes, but got {})",
7027                Self::ENCODED_LEN,
7028                __tmp.remaining(),
7029            )
7030        }
7031        __tmp.put_u32_le(self.time_boot_ms);
7032        __tmp.put_i32_le(self.lat_camera);
7033        __tmp.put_i32_le(self.lon_camera);
7034        __tmp.put_i32_le(self.alt_camera);
7035        __tmp.put_i32_le(self.lat_image);
7036        __tmp.put_i32_le(self.lon_image);
7037        __tmp.put_i32_le(self.alt_image);
7038        for val in &self.q {
7039            __tmp.put_f32_le(*val);
7040        }
7041        __tmp.put_f32_le(self.hfov);
7042        __tmp.put_f32_le(self.vfov);
7043        __tmp.put_u8(self.camera_device_id);
7044        if matches!(version, MavlinkVersion::V2) {
7045            let len = __tmp.len();
7046            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7047        } else {
7048            __tmp.len()
7049        }
7050    }
7051}
7052#[doc = "id: 263"]
7053#[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
7054#[derive(Debug, Clone, PartialEq)]
7055#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7056#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7057pub struct CAMERA_IMAGE_CAPTURED_DATA {
7058    #[doc = "Timestamp (time since UNIX epoch) in UTC. 0 for unknown."]
7059    pub time_utc: u64,
7060    #[doc = "Timestamp (time since system boot)."]
7061    pub time_boot_ms: u32,
7062    #[doc = "Latitude where image was taken"]
7063    pub lat: i32,
7064    #[doc = "Longitude where capture was taken"]
7065    pub lon: i32,
7066    #[doc = "Altitude (MSL) where image was taken"]
7067    pub alt: i32,
7068    #[doc = "Altitude above ground"]
7069    pub relative_alt: i32,
7070    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
7071    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7072    pub q: [f32; 4],
7073    #[doc = "Zero based index of this image (i.e. a new image will have index CAMERA_CAPTURE_STATUS.image count -1)"]
7074    pub image_index: i32,
7075    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id). Field name is usually camera_device_id."]
7076    pub camera_id: u8,
7077    #[doc = "Boolean indicating success (1) or failure (0) while capturing this image."]
7078    pub capture_result: i8,
7079    #[doc = "URL of image taken. Either local storage or <http://foo.jpg> if camera provides an HTTP interface."]
7080    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7081    pub file_url: [u8; 205],
7082}
7083impl CAMERA_IMAGE_CAPTURED_DATA {
7084    pub const ENCODED_LEN: usize = 255usize;
7085    pub const DEFAULT: Self = Self {
7086        time_utc: 0_u64,
7087        time_boot_ms: 0_u32,
7088        lat: 0_i32,
7089        lon: 0_i32,
7090        alt: 0_i32,
7091        relative_alt: 0_i32,
7092        q: [0.0_f32; 4usize],
7093        image_index: 0_i32,
7094        camera_id: 0_u8,
7095        capture_result: 0_i8,
7096        file_url: [0_u8; 205usize],
7097    };
7098    #[cfg(feature = "arbitrary")]
7099    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7100        use arbitrary::{Arbitrary, Unstructured};
7101        let mut buf = [0u8; 1024];
7102        rng.fill_bytes(&mut buf);
7103        let mut unstructured = Unstructured::new(&buf);
7104        Self::arbitrary(&mut unstructured).unwrap_or_default()
7105    }
7106}
7107impl Default for CAMERA_IMAGE_CAPTURED_DATA {
7108    fn default() -> Self {
7109        Self::DEFAULT.clone()
7110    }
7111}
7112impl MessageData for CAMERA_IMAGE_CAPTURED_DATA {
7113    type Message = MavMessage;
7114    const ID: u32 = 263u32;
7115    const NAME: &'static str = "CAMERA_IMAGE_CAPTURED";
7116    const EXTRA_CRC: u8 = 133u8;
7117    const ENCODED_LEN: usize = 255usize;
7118    fn deser(
7119        _version: MavlinkVersion,
7120        __input: &[u8],
7121    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7122        let avail_len = __input.len();
7123        let mut payload_buf = [0; Self::ENCODED_LEN];
7124        let mut buf = if avail_len < Self::ENCODED_LEN {
7125            payload_buf[0..avail_len].copy_from_slice(__input);
7126            Bytes::new(&payload_buf)
7127        } else {
7128            Bytes::new(__input)
7129        };
7130        let mut __struct = Self::default();
7131        __struct.time_utc = buf.get_u64_le();
7132        __struct.time_boot_ms = buf.get_u32_le();
7133        __struct.lat = buf.get_i32_le();
7134        __struct.lon = buf.get_i32_le();
7135        __struct.alt = buf.get_i32_le();
7136        __struct.relative_alt = buf.get_i32_le();
7137        for v in &mut __struct.q {
7138            let val = buf.get_f32_le();
7139            *v = val;
7140        }
7141        __struct.image_index = buf.get_i32_le();
7142        __struct.camera_id = buf.get_u8();
7143        __struct.capture_result = buf.get_i8();
7144        for v in &mut __struct.file_url {
7145            let val = buf.get_u8();
7146            *v = val;
7147        }
7148        Ok(__struct)
7149    }
7150    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7151        let mut __tmp = BytesMut::new(bytes);
7152        #[allow(clippy::absurd_extreme_comparisons)]
7153        #[allow(unused_comparisons)]
7154        if __tmp.remaining() < Self::ENCODED_LEN {
7155            panic!(
7156                "buffer is too small (need {} bytes, but got {})",
7157                Self::ENCODED_LEN,
7158                __tmp.remaining(),
7159            )
7160        }
7161        __tmp.put_u64_le(self.time_utc);
7162        __tmp.put_u32_le(self.time_boot_ms);
7163        __tmp.put_i32_le(self.lat);
7164        __tmp.put_i32_le(self.lon);
7165        __tmp.put_i32_le(self.alt);
7166        __tmp.put_i32_le(self.relative_alt);
7167        for val in &self.q {
7168            __tmp.put_f32_le(*val);
7169        }
7170        __tmp.put_i32_le(self.image_index);
7171        __tmp.put_u8(self.camera_id);
7172        __tmp.put_i8(self.capture_result);
7173        for val in &self.file_url {
7174            __tmp.put_u8(*val);
7175        }
7176        if matches!(version, MavlinkVersion::V2) {
7177            let len = __tmp.len();
7178            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7179        } else {
7180            __tmp.len()
7181        }
7182    }
7183}
7184#[doc = "id: 259"]
7185#[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7186#[derive(Debug, Clone, PartialEq)]
7187#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7188#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7189pub struct CAMERA_INFORMATION_DATA {
7190    #[doc = "Timestamp (time since system boot)."]
7191    pub time_boot_ms: u32,
7192    #[doc = "0xff). Use 0 if not known."]
7193    pub firmware_version: u32,
7194    #[doc = "Focal length. Use NaN if not known."]
7195    pub focal_length: f32,
7196    #[doc = "Image sensor size horizontal. Use NaN if not known."]
7197    pub sensor_size_h: f32,
7198    #[doc = "Image sensor size vertical. Use NaN if not known."]
7199    pub sensor_size_v: f32,
7200    #[doc = "Bitmap of camera capability flags."]
7201    pub flags: CameraCapFlags,
7202    #[doc = "Horizontal image resolution. Use 0 if not known."]
7203    pub resolution_h: u16,
7204    #[doc = "Vertical image resolution. Use 0 if not known."]
7205    pub resolution_v: u16,
7206    #[doc = "Camera definition version (iteration).  Use 0 if not known."]
7207    pub cam_definition_version: u16,
7208    #[doc = "Name of the camera vendor"]
7209    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7210    pub vendor_name: [u8; 32],
7211    #[doc = "Name of the camera model"]
7212    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7213    pub model_name: [u8; 32],
7214    #[doc = "Reserved for a lens ID.  Use 0 if not known."]
7215    pub lens_id: u8,
7216    #[doc = "Camera definition URI (if any, otherwise only basic functions will be available). HTTP- (http://) and MAVLink FTP- (mavlinkftp://) formatted URIs are allowed (and both must be supported by any GCS that implements the Camera Protocol). The definition file may be xz compressed, which will be indicated by the file extension .xml.xz (a GCS that implements the protocol must support decompressing the file). The string needs to be zero terminated.  Use a zero-length string if not known."]
7217    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7218    pub cam_definition_uri: [u8; 140],
7219    #[doc = "Gimbal id of a gimbal associated with this camera. This is the component id of the gimbal device, or 1-6 for non mavlink gimbals. Use 0 if no gimbal is associated with the camera."]
7220    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7221    pub gimbal_device_id: u8,
7222    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7223    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7224    pub camera_device_id: u8,
7225}
7226impl CAMERA_INFORMATION_DATA {
7227    pub const ENCODED_LEN: usize = 237usize;
7228    pub const DEFAULT: Self = Self {
7229        time_boot_ms: 0_u32,
7230        firmware_version: 0_u32,
7231        focal_length: 0.0_f32,
7232        sensor_size_h: 0.0_f32,
7233        sensor_size_v: 0.0_f32,
7234        flags: CameraCapFlags::DEFAULT,
7235        resolution_h: 0_u16,
7236        resolution_v: 0_u16,
7237        cam_definition_version: 0_u16,
7238        vendor_name: [0_u8; 32usize],
7239        model_name: [0_u8; 32usize],
7240        lens_id: 0_u8,
7241        cam_definition_uri: [0_u8; 140usize],
7242        gimbal_device_id: 0_u8,
7243        camera_device_id: 0_u8,
7244    };
7245    #[cfg(feature = "arbitrary")]
7246    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7247        use arbitrary::{Arbitrary, Unstructured};
7248        let mut buf = [0u8; 1024];
7249        rng.fill_bytes(&mut buf);
7250        let mut unstructured = Unstructured::new(&buf);
7251        Self::arbitrary(&mut unstructured).unwrap_or_default()
7252    }
7253}
7254impl Default for CAMERA_INFORMATION_DATA {
7255    fn default() -> Self {
7256        Self::DEFAULT.clone()
7257    }
7258}
7259impl MessageData for CAMERA_INFORMATION_DATA {
7260    type Message = MavMessage;
7261    const ID: u32 = 259u32;
7262    const NAME: &'static str = "CAMERA_INFORMATION";
7263    const EXTRA_CRC: u8 = 92u8;
7264    const ENCODED_LEN: usize = 237usize;
7265    fn deser(
7266        _version: MavlinkVersion,
7267        __input: &[u8],
7268    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7269        let avail_len = __input.len();
7270        let mut payload_buf = [0; Self::ENCODED_LEN];
7271        let mut buf = if avail_len < Self::ENCODED_LEN {
7272            payload_buf[0..avail_len].copy_from_slice(__input);
7273            Bytes::new(&payload_buf)
7274        } else {
7275            Bytes::new(__input)
7276        };
7277        let mut __struct = Self::default();
7278        __struct.time_boot_ms = buf.get_u32_le();
7279        __struct.firmware_version = buf.get_u32_le();
7280        __struct.focal_length = buf.get_f32_le();
7281        __struct.sensor_size_h = buf.get_f32_le();
7282        __struct.sensor_size_v = buf.get_f32_le();
7283        let tmp = buf.get_u32_le();
7284        __struct.flags = CameraCapFlags::from_bits(tmp & CameraCapFlags::all().bits()).ok_or(
7285            ::mavlink_core::error::ParserError::InvalidFlag {
7286                flag_type: "CameraCapFlags",
7287                value: tmp as u32,
7288            },
7289        )?;
7290        __struct.resolution_h = buf.get_u16_le();
7291        __struct.resolution_v = buf.get_u16_le();
7292        __struct.cam_definition_version = buf.get_u16_le();
7293        for v in &mut __struct.vendor_name {
7294            let val = buf.get_u8();
7295            *v = val;
7296        }
7297        for v in &mut __struct.model_name {
7298            let val = buf.get_u8();
7299            *v = val;
7300        }
7301        __struct.lens_id = buf.get_u8();
7302        for v in &mut __struct.cam_definition_uri {
7303            let val = buf.get_u8();
7304            *v = val;
7305        }
7306        __struct.gimbal_device_id = buf.get_u8();
7307        __struct.camera_device_id = buf.get_u8();
7308        Ok(__struct)
7309    }
7310    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7311        let mut __tmp = BytesMut::new(bytes);
7312        #[allow(clippy::absurd_extreme_comparisons)]
7313        #[allow(unused_comparisons)]
7314        if __tmp.remaining() < Self::ENCODED_LEN {
7315            panic!(
7316                "buffer is too small (need {} bytes, but got {})",
7317                Self::ENCODED_LEN,
7318                __tmp.remaining(),
7319            )
7320        }
7321        __tmp.put_u32_le(self.time_boot_ms);
7322        __tmp.put_u32_le(self.firmware_version);
7323        __tmp.put_f32_le(self.focal_length);
7324        __tmp.put_f32_le(self.sensor_size_h);
7325        __tmp.put_f32_le(self.sensor_size_v);
7326        __tmp.put_u32_le(self.flags.bits());
7327        __tmp.put_u16_le(self.resolution_h);
7328        __tmp.put_u16_le(self.resolution_v);
7329        __tmp.put_u16_le(self.cam_definition_version);
7330        for val in &self.vendor_name {
7331            __tmp.put_u8(*val);
7332        }
7333        for val in &self.model_name {
7334            __tmp.put_u8(*val);
7335        }
7336        __tmp.put_u8(self.lens_id);
7337        for val in &self.cam_definition_uri {
7338            __tmp.put_u8(*val);
7339        }
7340        __tmp.put_u8(self.gimbal_device_id);
7341        __tmp.put_u8(self.camera_device_id);
7342        if matches!(version, MavlinkVersion::V2) {
7343            let len = __tmp.len();
7344            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7345        } else {
7346            __tmp.len()
7347        }
7348    }
7349}
7350#[doc = "id: 260"]
7351#[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7352#[derive(Debug, Clone, PartialEq)]
7353#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7354#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7355pub struct CAMERA_SETTINGS_DATA {
7356    #[doc = "Timestamp (time since system boot)."]
7357    pub time_boot_ms: u32,
7358    #[doc = "Camera mode"]
7359    pub mode_id: CameraMode,
7360    #[doc = "Current zoom level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
7361    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7362    pub zoomLevel: f32,
7363    #[doc = "Current focus level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
7364    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7365    pub focusLevel: f32,
7366    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7367    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7368    pub camera_device_id: u8,
7369}
7370impl CAMERA_SETTINGS_DATA {
7371    pub const ENCODED_LEN: usize = 14usize;
7372    pub const DEFAULT: Self = Self {
7373        time_boot_ms: 0_u32,
7374        mode_id: CameraMode::DEFAULT,
7375        zoomLevel: 0.0_f32,
7376        focusLevel: 0.0_f32,
7377        camera_device_id: 0_u8,
7378    };
7379    #[cfg(feature = "arbitrary")]
7380    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7381        use arbitrary::{Arbitrary, Unstructured};
7382        let mut buf = [0u8; 1024];
7383        rng.fill_bytes(&mut buf);
7384        let mut unstructured = Unstructured::new(&buf);
7385        Self::arbitrary(&mut unstructured).unwrap_or_default()
7386    }
7387}
7388impl Default for CAMERA_SETTINGS_DATA {
7389    fn default() -> Self {
7390        Self::DEFAULT.clone()
7391    }
7392}
7393impl MessageData for CAMERA_SETTINGS_DATA {
7394    type Message = MavMessage;
7395    const ID: u32 = 260u32;
7396    const NAME: &'static str = "CAMERA_SETTINGS";
7397    const EXTRA_CRC: u8 = 146u8;
7398    const ENCODED_LEN: usize = 14usize;
7399    fn deser(
7400        _version: MavlinkVersion,
7401        __input: &[u8],
7402    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7403        let avail_len = __input.len();
7404        let mut payload_buf = [0; Self::ENCODED_LEN];
7405        let mut buf = if avail_len < Self::ENCODED_LEN {
7406            payload_buf[0..avail_len].copy_from_slice(__input);
7407            Bytes::new(&payload_buf)
7408        } else {
7409            Bytes::new(__input)
7410        };
7411        let mut __struct = Self::default();
7412        __struct.time_boot_ms = buf.get_u32_le();
7413        let tmp = buf.get_u8();
7414        __struct.mode_id =
7415            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7416                enum_type: "CameraMode",
7417                value: tmp as u32,
7418            })?;
7419        __struct.zoomLevel = buf.get_f32_le();
7420        __struct.focusLevel = buf.get_f32_le();
7421        __struct.camera_device_id = buf.get_u8();
7422        Ok(__struct)
7423    }
7424    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7425        let mut __tmp = BytesMut::new(bytes);
7426        #[allow(clippy::absurd_extreme_comparisons)]
7427        #[allow(unused_comparisons)]
7428        if __tmp.remaining() < Self::ENCODED_LEN {
7429            panic!(
7430                "buffer is too small (need {} bytes, but got {})",
7431                Self::ENCODED_LEN,
7432                __tmp.remaining(),
7433            )
7434        }
7435        __tmp.put_u32_le(self.time_boot_ms);
7436        __tmp.put_u8(self.mode_id as u8);
7437        __tmp.put_f32_le(self.zoomLevel);
7438        __tmp.put_f32_le(self.focusLevel);
7439        __tmp.put_u8(self.camera_device_id);
7440        if matches!(version, MavlinkVersion::V2) {
7441            let len = __tmp.len();
7442            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7443        } else {
7444            __tmp.len()
7445        }
7446    }
7447}
7448#[doc = "id: 277"]
7449#[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
7450#[derive(Debug, Clone, PartialEq)]
7451#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7452#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7453pub struct CAMERA_THERMAL_RANGE_DATA {
7454    #[doc = "Timestamp (time since system boot)."]
7455    pub time_boot_ms: u32,
7456    #[doc = "Temperature max."]
7457    pub max: f32,
7458    #[doc = "Temperature max point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
7459    pub max_point_x: f32,
7460    #[doc = "Temperature max point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
7461    pub max_point_y: f32,
7462    #[doc = "Temperature min."]
7463    pub min: f32,
7464    #[doc = "Temperature min point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
7465    pub min_point_x: f32,
7466    #[doc = "Temperature min point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
7467    pub min_point_y: f32,
7468    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
7469    pub stream_id: u8,
7470    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7471    pub camera_device_id: u8,
7472}
7473impl CAMERA_THERMAL_RANGE_DATA {
7474    pub const ENCODED_LEN: usize = 30usize;
7475    pub const DEFAULT: Self = Self {
7476        time_boot_ms: 0_u32,
7477        max: 0.0_f32,
7478        max_point_x: 0.0_f32,
7479        max_point_y: 0.0_f32,
7480        min: 0.0_f32,
7481        min_point_x: 0.0_f32,
7482        min_point_y: 0.0_f32,
7483        stream_id: 0_u8,
7484        camera_device_id: 0_u8,
7485    };
7486    #[cfg(feature = "arbitrary")]
7487    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7488        use arbitrary::{Arbitrary, Unstructured};
7489        let mut buf = [0u8; 1024];
7490        rng.fill_bytes(&mut buf);
7491        let mut unstructured = Unstructured::new(&buf);
7492        Self::arbitrary(&mut unstructured).unwrap_or_default()
7493    }
7494}
7495impl Default for CAMERA_THERMAL_RANGE_DATA {
7496    fn default() -> Self {
7497        Self::DEFAULT.clone()
7498    }
7499}
7500impl MessageData for CAMERA_THERMAL_RANGE_DATA {
7501    type Message = MavMessage;
7502    const ID: u32 = 277u32;
7503    const NAME: &'static str = "CAMERA_THERMAL_RANGE";
7504    const EXTRA_CRC: u8 = 62u8;
7505    const ENCODED_LEN: usize = 30usize;
7506    fn deser(
7507        _version: MavlinkVersion,
7508        __input: &[u8],
7509    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7510        let avail_len = __input.len();
7511        let mut payload_buf = [0; Self::ENCODED_LEN];
7512        let mut buf = if avail_len < Self::ENCODED_LEN {
7513            payload_buf[0..avail_len].copy_from_slice(__input);
7514            Bytes::new(&payload_buf)
7515        } else {
7516            Bytes::new(__input)
7517        };
7518        let mut __struct = Self::default();
7519        __struct.time_boot_ms = buf.get_u32_le();
7520        __struct.max = buf.get_f32_le();
7521        __struct.max_point_x = buf.get_f32_le();
7522        __struct.max_point_y = buf.get_f32_le();
7523        __struct.min = buf.get_f32_le();
7524        __struct.min_point_x = buf.get_f32_le();
7525        __struct.min_point_y = buf.get_f32_le();
7526        __struct.stream_id = buf.get_u8();
7527        __struct.camera_device_id = buf.get_u8();
7528        Ok(__struct)
7529    }
7530    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7531        let mut __tmp = BytesMut::new(bytes);
7532        #[allow(clippy::absurd_extreme_comparisons)]
7533        #[allow(unused_comparisons)]
7534        if __tmp.remaining() < Self::ENCODED_LEN {
7535            panic!(
7536                "buffer is too small (need {} bytes, but got {})",
7537                Self::ENCODED_LEN,
7538                __tmp.remaining(),
7539            )
7540        }
7541        __tmp.put_u32_le(self.time_boot_ms);
7542        __tmp.put_f32_le(self.max);
7543        __tmp.put_f32_le(self.max_point_x);
7544        __tmp.put_f32_le(self.max_point_y);
7545        __tmp.put_f32_le(self.min);
7546        __tmp.put_f32_le(self.min_point_x);
7547        __tmp.put_f32_le(self.min_point_y);
7548        __tmp.put_u8(self.stream_id);
7549        __tmp.put_u8(self.camera_device_id);
7550        if matches!(version, MavlinkVersion::V2) {
7551            let len = __tmp.len();
7552            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7553        } else {
7554            __tmp.len()
7555        }
7556    }
7557}
7558#[doc = "id: 276"]
7559#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
7560#[derive(Debug, Clone, PartialEq)]
7561#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7562#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7563pub struct CAMERA_TRACKING_GEO_STATUS_DATA {
7564    #[doc = "Latitude of tracked object"]
7565    pub lat: i32,
7566    #[doc = "Longitude of tracked object"]
7567    pub lon: i32,
7568    #[doc = "Altitude of tracked object(AMSL, WGS84)"]
7569    pub alt: f32,
7570    #[doc = "Horizontal accuracy. NAN if unknown"]
7571    pub h_acc: f32,
7572    #[doc = "Vertical accuracy. NAN if unknown"]
7573    pub v_acc: f32,
7574    #[doc = "North velocity of tracked object. NAN if unknown"]
7575    pub vel_n: f32,
7576    #[doc = "East velocity of tracked object. NAN if unknown"]
7577    pub vel_e: f32,
7578    #[doc = "Down velocity of tracked object. NAN if unknown"]
7579    pub vel_d: f32,
7580    #[doc = "Velocity accuracy. NAN if unknown"]
7581    pub vel_acc: f32,
7582    #[doc = "Distance between camera and tracked object. NAN if unknown"]
7583    pub dist: f32,
7584    #[doc = "Heading in radians, in NED. NAN if unknown"]
7585    pub hdg: f32,
7586    #[doc = "Accuracy of heading, in NED. NAN if unknown"]
7587    pub hdg_acc: f32,
7588    #[doc = "Current tracking status"]
7589    pub tracking_status: CameraTrackingStatusFlags,
7590    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7591    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7592    pub camera_device_id: u8,
7593}
7594impl CAMERA_TRACKING_GEO_STATUS_DATA {
7595    pub const ENCODED_LEN: usize = 50usize;
7596    pub const DEFAULT: Self = Self {
7597        lat: 0_i32,
7598        lon: 0_i32,
7599        alt: 0.0_f32,
7600        h_acc: 0.0_f32,
7601        v_acc: 0.0_f32,
7602        vel_n: 0.0_f32,
7603        vel_e: 0.0_f32,
7604        vel_d: 0.0_f32,
7605        vel_acc: 0.0_f32,
7606        dist: 0.0_f32,
7607        hdg: 0.0_f32,
7608        hdg_acc: 0.0_f32,
7609        tracking_status: CameraTrackingStatusFlags::DEFAULT,
7610        camera_device_id: 0_u8,
7611    };
7612    #[cfg(feature = "arbitrary")]
7613    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7614        use arbitrary::{Arbitrary, Unstructured};
7615        let mut buf = [0u8; 1024];
7616        rng.fill_bytes(&mut buf);
7617        let mut unstructured = Unstructured::new(&buf);
7618        Self::arbitrary(&mut unstructured).unwrap_or_default()
7619    }
7620}
7621impl Default for CAMERA_TRACKING_GEO_STATUS_DATA {
7622    fn default() -> Self {
7623        Self::DEFAULT.clone()
7624    }
7625}
7626impl MessageData for CAMERA_TRACKING_GEO_STATUS_DATA {
7627    type Message = MavMessage;
7628    const ID: u32 = 276u32;
7629    const NAME: &'static str = "CAMERA_TRACKING_GEO_STATUS";
7630    const EXTRA_CRC: u8 = 18u8;
7631    const ENCODED_LEN: usize = 50usize;
7632    fn deser(
7633        _version: MavlinkVersion,
7634        __input: &[u8],
7635    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7636        let avail_len = __input.len();
7637        let mut payload_buf = [0; Self::ENCODED_LEN];
7638        let mut buf = if avail_len < Self::ENCODED_LEN {
7639            payload_buf[0..avail_len].copy_from_slice(__input);
7640            Bytes::new(&payload_buf)
7641        } else {
7642            Bytes::new(__input)
7643        };
7644        let mut __struct = Self::default();
7645        __struct.lat = buf.get_i32_le();
7646        __struct.lon = buf.get_i32_le();
7647        __struct.alt = buf.get_f32_le();
7648        __struct.h_acc = buf.get_f32_le();
7649        __struct.v_acc = buf.get_f32_le();
7650        __struct.vel_n = buf.get_f32_le();
7651        __struct.vel_e = buf.get_f32_le();
7652        __struct.vel_d = buf.get_f32_le();
7653        __struct.vel_acc = buf.get_f32_le();
7654        __struct.dist = buf.get_f32_le();
7655        __struct.hdg = buf.get_f32_le();
7656        __struct.hdg_acc = buf.get_f32_le();
7657        let tmp = buf.get_u8();
7658        __struct.tracking_status =
7659            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7660                enum_type: "CameraTrackingStatusFlags",
7661                value: tmp as u32,
7662            })?;
7663        __struct.camera_device_id = buf.get_u8();
7664        Ok(__struct)
7665    }
7666    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7667        let mut __tmp = BytesMut::new(bytes);
7668        #[allow(clippy::absurd_extreme_comparisons)]
7669        #[allow(unused_comparisons)]
7670        if __tmp.remaining() < Self::ENCODED_LEN {
7671            panic!(
7672                "buffer is too small (need {} bytes, but got {})",
7673                Self::ENCODED_LEN,
7674                __tmp.remaining(),
7675            )
7676        }
7677        __tmp.put_i32_le(self.lat);
7678        __tmp.put_i32_le(self.lon);
7679        __tmp.put_f32_le(self.alt);
7680        __tmp.put_f32_le(self.h_acc);
7681        __tmp.put_f32_le(self.v_acc);
7682        __tmp.put_f32_le(self.vel_n);
7683        __tmp.put_f32_le(self.vel_e);
7684        __tmp.put_f32_le(self.vel_d);
7685        __tmp.put_f32_le(self.vel_acc);
7686        __tmp.put_f32_le(self.dist);
7687        __tmp.put_f32_le(self.hdg);
7688        __tmp.put_f32_le(self.hdg_acc);
7689        __tmp.put_u8(self.tracking_status as u8);
7690        __tmp.put_u8(self.camera_device_id);
7691        if matches!(version, MavlinkVersion::V2) {
7692            let len = __tmp.len();
7693            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7694        } else {
7695            __tmp.len()
7696        }
7697    }
7698}
7699#[doc = "id: 275"]
7700#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
7701#[derive(Debug, Clone, PartialEq)]
7702#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7703#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7704pub struct CAMERA_TRACKING_IMAGE_STATUS_DATA {
7705    #[doc = "Current tracked point x value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
7706    pub point_x: f32,
7707    #[doc = "Current tracked point y value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
7708    pub point_y: f32,
7709    #[doc = "Current tracked radius if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is image left, 1 is image right), NAN if unknown"]
7710    pub radius: f32,
7711    #[doc = "Current tracked rectangle top x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
7712    pub rec_top_x: f32,
7713    #[doc = "Current tracked rectangle top y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
7714    pub rec_top_y: f32,
7715    #[doc = "Current tracked rectangle bottom x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
7716    pub rec_bottom_x: f32,
7717    #[doc = "Current tracked rectangle bottom y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
7718    pub rec_bottom_y: f32,
7719    #[doc = "Current tracking status"]
7720    pub tracking_status: CameraTrackingStatusFlags,
7721    #[doc = "Current tracking mode"]
7722    pub tracking_mode: CameraTrackingMode,
7723    #[doc = "Defines location of target data"]
7724    pub target_data: CameraTrackingTargetData,
7725    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7726    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7727    pub camera_device_id: u8,
7728}
7729impl CAMERA_TRACKING_IMAGE_STATUS_DATA {
7730    pub const ENCODED_LEN: usize = 32usize;
7731    pub const DEFAULT: Self = Self {
7732        point_x: 0.0_f32,
7733        point_y: 0.0_f32,
7734        radius: 0.0_f32,
7735        rec_top_x: 0.0_f32,
7736        rec_top_y: 0.0_f32,
7737        rec_bottom_x: 0.0_f32,
7738        rec_bottom_y: 0.0_f32,
7739        tracking_status: CameraTrackingStatusFlags::DEFAULT,
7740        tracking_mode: CameraTrackingMode::DEFAULT,
7741        target_data: CameraTrackingTargetData::DEFAULT,
7742        camera_device_id: 0_u8,
7743    };
7744    #[cfg(feature = "arbitrary")]
7745    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7746        use arbitrary::{Arbitrary, Unstructured};
7747        let mut buf = [0u8; 1024];
7748        rng.fill_bytes(&mut buf);
7749        let mut unstructured = Unstructured::new(&buf);
7750        Self::arbitrary(&mut unstructured).unwrap_or_default()
7751    }
7752}
7753impl Default for CAMERA_TRACKING_IMAGE_STATUS_DATA {
7754    fn default() -> Self {
7755        Self::DEFAULT.clone()
7756    }
7757}
7758impl MessageData for CAMERA_TRACKING_IMAGE_STATUS_DATA {
7759    type Message = MavMessage;
7760    const ID: u32 = 275u32;
7761    const NAME: &'static str = "CAMERA_TRACKING_IMAGE_STATUS";
7762    const EXTRA_CRC: u8 = 126u8;
7763    const ENCODED_LEN: usize = 32usize;
7764    fn deser(
7765        _version: MavlinkVersion,
7766        __input: &[u8],
7767    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7768        let avail_len = __input.len();
7769        let mut payload_buf = [0; Self::ENCODED_LEN];
7770        let mut buf = if avail_len < Self::ENCODED_LEN {
7771            payload_buf[0..avail_len].copy_from_slice(__input);
7772            Bytes::new(&payload_buf)
7773        } else {
7774            Bytes::new(__input)
7775        };
7776        let mut __struct = Self::default();
7777        __struct.point_x = buf.get_f32_le();
7778        __struct.point_y = buf.get_f32_le();
7779        __struct.radius = buf.get_f32_le();
7780        __struct.rec_top_x = buf.get_f32_le();
7781        __struct.rec_top_y = buf.get_f32_le();
7782        __struct.rec_bottom_x = buf.get_f32_le();
7783        __struct.rec_bottom_y = buf.get_f32_le();
7784        let tmp = buf.get_u8();
7785        __struct.tracking_status =
7786            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7787                enum_type: "CameraTrackingStatusFlags",
7788                value: tmp as u32,
7789            })?;
7790        let tmp = buf.get_u8();
7791        __struct.tracking_mode =
7792            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7793                enum_type: "CameraTrackingMode",
7794                value: tmp as u32,
7795            })?;
7796        let tmp = buf.get_u8();
7797        __struct.target_data =
7798            CameraTrackingTargetData::from_bits(tmp & CameraTrackingTargetData::all().bits())
7799                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
7800                    flag_type: "CameraTrackingTargetData",
7801                    value: tmp as u32,
7802                })?;
7803        __struct.camera_device_id = buf.get_u8();
7804        Ok(__struct)
7805    }
7806    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7807        let mut __tmp = BytesMut::new(bytes);
7808        #[allow(clippy::absurd_extreme_comparisons)]
7809        #[allow(unused_comparisons)]
7810        if __tmp.remaining() < Self::ENCODED_LEN {
7811            panic!(
7812                "buffer is too small (need {} bytes, but got {})",
7813                Self::ENCODED_LEN,
7814                __tmp.remaining(),
7815            )
7816        }
7817        __tmp.put_f32_le(self.point_x);
7818        __tmp.put_f32_le(self.point_y);
7819        __tmp.put_f32_le(self.radius);
7820        __tmp.put_f32_le(self.rec_top_x);
7821        __tmp.put_f32_le(self.rec_top_y);
7822        __tmp.put_f32_le(self.rec_bottom_x);
7823        __tmp.put_f32_le(self.rec_bottom_y);
7824        __tmp.put_u8(self.tracking_status as u8);
7825        __tmp.put_u8(self.tracking_mode as u8);
7826        __tmp.put_u8(self.target_data.bits());
7827        __tmp.put_u8(self.camera_device_id);
7828        if matches!(version, MavlinkVersion::V2) {
7829            let len = __tmp.len();
7830            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7831        } else {
7832            __tmp.len()
7833        }
7834    }
7835}
7836#[doc = "id: 112"]
7837#[doc = "Camera-IMU triggering and synchronisation message."]
7838#[derive(Debug, Clone, PartialEq)]
7839#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7840#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7841pub struct CAMERA_TRIGGER_DATA {
7842    #[doc = "Timestamp for image frame (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
7843    pub time_usec: u64,
7844    #[doc = "Image frame sequence"]
7845    pub seq: u32,
7846}
7847impl CAMERA_TRIGGER_DATA {
7848    pub const ENCODED_LEN: usize = 12usize;
7849    pub const DEFAULT: Self = Self {
7850        time_usec: 0_u64,
7851        seq: 0_u32,
7852    };
7853    #[cfg(feature = "arbitrary")]
7854    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7855        use arbitrary::{Arbitrary, Unstructured};
7856        let mut buf = [0u8; 1024];
7857        rng.fill_bytes(&mut buf);
7858        let mut unstructured = Unstructured::new(&buf);
7859        Self::arbitrary(&mut unstructured).unwrap_or_default()
7860    }
7861}
7862impl Default for CAMERA_TRIGGER_DATA {
7863    fn default() -> Self {
7864        Self::DEFAULT.clone()
7865    }
7866}
7867impl MessageData for CAMERA_TRIGGER_DATA {
7868    type Message = MavMessage;
7869    const ID: u32 = 112u32;
7870    const NAME: &'static str = "CAMERA_TRIGGER";
7871    const EXTRA_CRC: u8 = 174u8;
7872    const ENCODED_LEN: usize = 12usize;
7873    fn deser(
7874        _version: MavlinkVersion,
7875        __input: &[u8],
7876    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7877        let avail_len = __input.len();
7878        let mut payload_buf = [0; Self::ENCODED_LEN];
7879        let mut buf = if avail_len < Self::ENCODED_LEN {
7880            payload_buf[0..avail_len].copy_from_slice(__input);
7881            Bytes::new(&payload_buf)
7882        } else {
7883            Bytes::new(__input)
7884        };
7885        let mut __struct = Self::default();
7886        __struct.time_usec = buf.get_u64_le();
7887        __struct.seq = buf.get_u32_le();
7888        Ok(__struct)
7889    }
7890    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7891        let mut __tmp = BytesMut::new(bytes);
7892        #[allow(clippy::absurd_extreme_comparisons)]
7893        #[allow(unused_comparisons)]
7894        if __tmp.remaining() < Self::ENCODED_LEN {
7895            panic!(
7896                "buffer is too small (need {} bytes, but got {})",
7897                Self::ENCODED_LEN,
7898                __tmp.remaining(),
7899            )
7900        }
7901        __tmp.put_u64_le(self.time_usec);
7902        __tmp.put_u32_le(self.seq);
7903        if matches!(version, MavlinkVersion::V2) {
7904            let len = __tmp.len();
7905            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7906        } else {
7907            __tmp.len()
7908        }
7909    }
7910}
7911#[doc = "id: 387"]
7912#[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
7913#[derive(Debug, Clone, PartialEq)]
7914#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7915#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7916pub struct CANFD_FRAME_DATA {
7917    #[doc = "Frame ID"]
7918    pub id: u32,
7919    #[doc = "System ID."]
7920    pub target_system: u8,
7921    #[doc = "Component ID."]
7922    pub target_component: u8,
7923    #[doc = "bus number"]
7924    pub bus: u8,
7925    #[doc = "Frame length"]
7926    pub len: u8,
7927    #[doc = "Frame data"]
7928    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7929    pub data: [u8; 64],
7930}
7931impl CANFD_FRAME_DATA {
7932    pub const ENCODED_LEN: usize = 72usize;
7933    pub const DEFAULT: Self = Self {
7934        id: 0_u32,
7935        target_system: 0_u8,
7936        target_component: 0_u8,
7937        bus: 0_u8,
7938        len: 0_u8,
7939        data: [0_u8; 64usize],
7940    };
7941    #[cfg(feature = "arbitrary")]
7942    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7943        use arbitrary::{Arbitrary, Unstructured};
7944        let mut buf = [0u8; 1024];
7945        rng.fill_bytes(&mut buf);
7946        let mut unstructured = Unstructured::new(&buf);
7947        Self::arbitrary(&mut unstructured).unwrap_or_default()
7948    }
7949}
7950impl Default for CANFD_FRAME_DATA {
7951    fn default() -> Self {
7952        Self::DEFAULT.clone()
7953    }
7954}
7955impl MessageData for CANFD_FRAME_DATA {
7956    type Message = MavMessage;
7957    const ID: u32 = 387u32;
7958    const NAME: &'static str = "CANFD_FRAME";
7959    const EXTRA_CRC: u8 = 4u8;
7960    const ENCODED_LEN: usize = 72usize;
7961    fn deser(
7962        _version: MavlinkVersion,
7963        __input: &[u8],
7964    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7965        let avail_len = __input.len();
7966        let mut payload_buf = [0; Self::ENCODED_LEN];
7967        let mut buf = if avail_len < Self::ENCODED_LEN {
7968            payload_buf[0..avail_len].copy_from_slice(__input);
7969            Bytes::new(&payload_buf)
7970        } else {
7971            Bytes::new(__input)
7972        };
7973        let mut __struct = Self::default();
7974        __struct.id = buf.get_u32_le();
7975        __struct.target_system = buf.get_u8();
7976        __struct.target_component = buf.get_u8();
7977        __struct.bus = buf.get_u8();
7978        __struct.len = buf.get_u8();
7979        for v in &mut __struct.data {
7980            let val = buf.get_u8();
7981            *v = val;
7982        }
7983        Ok(__struct)
7984    }
7985    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7986        let mut __tmp = BytesMut::new(bytes);
7987        #[allow(clippy::absurd_extreme_comparisons)]
7988        #[allow(unused_comparisons)]
7989        if __tmp.remaining() < Self::ENCODED_LEN {
7990            panic!(
7991                "buffer is too small (need {} bytes, but got {})",
7992                Self::ENCODED_LEN,
7993                __tmp.remaining(),
7994            )
7995        }
7996        __tmp.put_u32_le(self.id);
7997        __tmp.put_u8(self.target_system);
7998        __tmp.put_u8(self.target_component);
7999        __tmp.put_u8(self.bus);
8000        __tmp.put_u8(self.len);
8001        for val in &self.data {
8002            __tmp.put_u8(*val);
8003        }
8004        if matches!(version, MavlinkVersion::V2) {
8005            let len = __tmp.len();
8006            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8007        } else {
8008            __tmp.len()
8009        }
8010    }
8011}
8012#[doc = "id: 388"]
8013#[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
8014#[derive(Debug, Clone, PartialEq)]
8015#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8016#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8017pub struct CAN_FILTER_MODIFY_DATA {
8018    #[doc = "filter IDs, length num_ids"]
8019    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8020    pub ids: [u16; 16],
8021    #[doc = "System ID."]
8022    pub target_system: u8,
8023    #[doc = "Component ID."]
8024    pub target_component: u8,
8025    #[doc = "bus number"]
8026    pub bus: u8,
8027    #[doc = "what operation to perform on the filter list. See CAN_FILTER_OP enum."]
8028    pub operation: CanFilterOp,
8029    #[doc = "number of IDs in filter list"]
8030    pub num_ids: u8,
8031}
8032impl CAN_FILTER_MODIFY_DATA {
8033    pub const ENCODED_LEN: usize = 37usize;
8034    pub const DEFAULT: Self = Self {
8035        ids: [0_u16; 16usize],
8036        target_system: 0_u8,
8037        target_component: 0_u8,
8038        bus: 0_u8,
8039        operation: CanFilterOp::DEFAULT,
8040        num_ids: 0_u8,
8041    };
8042    #[cfg(feature = "arbitrary")]
8043    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8044        use arbitrary::{Arbitrary, Unstructured};
8045        let mut buf = [0u8; 1024];
8046        rng.fill_bytes(&mut buf);
8047        let mut unstructured = Unstructured::new(&buf);
8048        Self::arbitrary(&mut unstructured).unwrap_or_default()
8049    }
8050}
8051impl Default for CAN_FILTER_MODIFY_DATA {
8052    fn default() -> Self {
8053        Self::DEFAULT.clone()
8054    }
8055}
8056impl MessageData for CAN_FILTER_MODIFY_DATA {
8057    type Message = MavMessage;
8058    const ID: u32 = 388u32;
8059    const NAME: &'static str = "CAN_FILTER_MODIFY";
8060    const EXTRA_CRC: u8 = 8u8;
8061    const ENCODED_LEN: usize = 37usize;
8062    fn deser(
8063        _version: MavlinkVersion,
8064        __input: &[u8],
8065    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8066        let avail_len = __input.len();
8067        let mut payload_buf = [0; Self::ENCODED_LEN];
8068        let mut buf = if avail_len < Self::ENCODED_LEN {
8069            payload_buf[0..avail_len].copy_from_slice(__input);
8070            Bytes::new(&payload_buf)
8071        } else {
8072            Bytes::new(__input)
8073        };
8074        let mut __struct = Self::default();
8075        for v in &mut __struct.ids {
8076            let val = buf.get_u16_le();
8077            *v = val;
8078        }
8079        __struct.target_system = buf.get_u8();
8080        __struct.target_component = buf.get_u8();
8081        __struct.bus = buf.get_u8();
8082        let tmp = buf.get_u8();
8083        __struct.operation =
8084            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8085                enum_type: "CanFilterOp",
8086                value: tmp as u32,
8087            })?;
8088        __struct.num_ids = buf.get_u8();
8089        Ok(__struct)
8090    }
8091    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8092        let mut __tmp = BytesMut::new(bytes);
8093        #[allow(clippy::absurd_extreme_comparisons)]
8094        #[allow(unused_comparisons)]
8095        if __tmp.remaining() < Self::ENCODED_LEN {
8096            panic!(
8097                "buffer is too small (need {} bytes, but got {})",
8098                Self::ENCODED_LEN,
8099                __tmp.remaining(),
8100            )
8101        }
8102        for val in &self.ids {
8103            __tmp.put_u16_le(*val);
8104        }
8105        __tmp.put_u8(self.target_system);
8106        __tmp.put_u8(self.target_component);
8107        __tmp.put_u8(self.bus);
8108        __tmp.put_u8(self.operation as u8);
8109        __tmp.put_u8(self.num_ids);
8110        if matches!(version, MavlinkVersion::V2) {
8111            let len = __tmp.len();
8112            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8113        } else {
8114            __tmp.len()
8115        }
8116    }
8117}
8118#[doc = "id: 386"]
8119#[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
8120#[derive(Debug, Clone, PartialEq)]
8121#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8122#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8123pub struct CAN_FRAME_DATA {
8124    #[doc = "Frame ID"]
8125    pub id: u32,
8126    #[doc = "System ID."]
8127    pub target_system: u8,
8128    #[doc = "Component ID."]
8129    pub target_component: u8,
8130    #[doc = "Bus number"]
8131    pub bus: u8,
8132    #[doc = "Frame length"]
8133    pub len: u8,
8134    #[doc = "Frame data"]
8135    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8136    pub data: [u8; 8],
8137}
8138impl CAN_FRAME_DATA {
8139    pub const ENCODED_LEN: usize = 16usize;
8140    pub const DEFAULT: Self = Self {
8141        id: 0_u32,
8142        target_system: 0_u8,
8143        target_component: 0_u8,
8144        bus: 0_u8,
8145        len: 0_u8,
8146        data: [0_u8; 8usize],
8147    };
8148    #[cfg(feature = "arbitrary")]
8149    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8150        use arbitrary::{Arbitrary, Unstructured};
8151        let mut buf = [0u8; 1024];
8152        rng.fill_bytes(&mut buf);
8153        let mut unstructured = Unstructured::new(&buf);
8154        Self::arbitrary(&mut unstructured).unwrap_or_default()
8155    }
8156}
8157impl Default for CAN_FRAME_DATA {
8158    fn default() -> Self {
8159        Self::DEFAULT.clone()
8160    }
8161}
8162impl MessageData for CAN_FRAME_DATA {
8163    type Message = MavMessage;
8164    const ID: u32 = 386u32;
8165    const NAME: &'static str = "CAN_FRAME";
8166    const EXTRA_CRC: u8 = 132u8;
8167    const ENCODED_LEN: usize = 16usize;
8168    fn deser(
8169        _version: MavlinkVersion,
8170        __input: &[u8],
8171    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8172        let avail_len = __input.len();
8173        let mut payload_buf = [0; Self::ENCODED_LEN];
8174        let mut buf = if avail_len < Self::ENCODED_LEN {
8175            payload_buf[0..avail_len].copy_from_slice(__input);
8176            Bytes::new(&payload_buf)
8177        } else {
8178            Bytes::new(__input)
8179        };
8180        let mut __struct = Self::default();
8181        __struct.id = buf.get_u32_le();
8182        __struct.target_system = buf.get_u8();
8183        __struct.target_component = buf.get_u8();
8184        __struct.bus = buf.get_u8();
8185        __struct.len = buf.get_u8();
8186        for v in &mut __struct.data {
8187            let val = buf.get_u8();
8188            *v = val;
8189        }
8190        Ok(__struct)
8191    }
8192    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8193        let mut __tmp = BytesMut::new(bytes);
8194        #[allow(clippy::absurd_extreme_comparisons)]
8195        #[allow(unused_comparisons)]
8196        if __tmp.remaining() < Self::ENCODED_LEN {
8197            panic!(
8198                "buffer is too small (need {} bytes, but got {})",
8199                Self::ENCODED_LEN,
8200                __tmp.remaining(),
8201            )
8202        }
8203        __tmp.put_u32_le(self.id);
8204        __tmp.put_u8(self.target_system);
8205        __tmp.put_u8(self.target_component);
8206        __tmp.put_u8(self.bus);
8207        __tmp.put_u8(self.len);
8208        for val in &self.data {
8209            __tmp.put_u8(*val);
8210        }
8211        if matches!(version, MavlinkVersion::V2) {
8212            let len = __tmp.len();
8213            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8214        } else {
8215            __tmp.len()
8216        }
8217    }
8218}
8219#[doc = "id: 336"]
8220#[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
8221#[derive(Debug, Clone, PartialEq)]
8222#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8223#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8224pub struct CELLULAR_CONFIG_DATA {
8225    #[doc = "Enable/disable LTE. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8226    pub enable_lte: u8,
8227    #[doc = "Enable/disable PIN on the SIM card. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8228    pub enable_pin: u8,
8229    #[doc = "PIN sent to the SIM card. Blank when PIN is disabled. Empty when message is sent back as a response."]
8230    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8231    pub pin: [u8; 16],
8232    #[doc = "New PIN when changing the PIN. Blank to leave it unchanged. Empty when message is sent back as a response."]
8233    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8234    pub new_pin: [u8; 16],
8235    #[doc = "Name of the cellular APN. Blank to leave it unchanged. Current APN when sent back as a response."]
8236    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8237    pub apn: [u8; 32],
8238    #[doc = "Required PUK code in case the user failed to authenticate 3 times with the PIN. Empty when message is sent back as a response."]
8239    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8240    pub puk: [u8; 16],
8241    #[doc = "Enable/disable roaming. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8242    pub roaming: u8,
8243    #[doc = "Message acceptance response (sent back to GS)."]
8244    pub response: CellularConfigResponse,
8245}
8246impl CELLULAR_CONFIG_DATA {
8247    pub const ENCODED_LEN: usize = 84usize;
8248    pub const DEFAULT: Self = Self {
8249        enable_lte: 0_u8,
8250        enable_pin: 0_u8,
8251        pin: [0_u8; 16usize],
8252        new_pin: [0_u8; 16usize],
8253        apn: [0_u8; 32usize],
8254        puk: [0_u8; 16usize],
8255        roaming: 0_u8,
8256        response: CellularConfigResponse::DEFAULT,
8257    };
8258    #[cfg(feature = "arbitrary")]
8259    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8260        use arbitrary::{Arbitrary, Unstructured};
8261        let mut buf = [0u8; 1024];
8262        rng.fill_bytes(&mut buf);
8263        let mut unstructured = Unstructured::new(&buf);
8264        Self::arbitrary(&mut unstructured).unwrap_or_default()
8265    }
8266}
8267impl Default for CELLULAR_CONFIG_DATA {
8268    fn default() -> Self {
8269        Self::DEFAULT.clone()
8270    }
8271}
8272impl MessageData for CELLULAR_CONFIG_DATA {
8273    type Message = MavMessage;
8274    const ID: u32 = 336u32;
8275    const NAME: &'static str = "CELLULAR_CONFIG";
8276    const EXTRA_CRC: u8 = 245u8;
8277    const ENCODED_LEN: usize = 84usize;
8278    fn deser(
8279        _version: MavlinkVersion,
8280        __input: &[u8],
8281    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8282        let avail_len = __input.len();
8283        let mut payload_buf = [0; Self::ENCODED_LEN];
8284        let mut buf = if avail_len < Self::ENCODED_LEN {
8285            payload_buf[0..avail_len].copy_from_slice(__input);
8286            Bytes::new(&payload_buf)
8287        } else {
8288            Bytes::new(__input)
8289        };
8290        let mut __struct = Self::default();
8291        __struct.enable_lte = buf.get_u8();
8292        __struct.enable_pin = buf.get_u8();
8293        for v in &mut __struct.pin {
8294            let val = buf.get_u8();
8295            *v = val;
8296        }
8297        for v in &mut __struct.new_pin {
8298            let val = buf.get_u8();
8299            *v = val;
8300        }
8301        for v in &mut __struct.apn {
8302            let val = buf.get_u8();
8303            *v = val;
8304        }
8305        for v in &mut __struct.puk {
8306            let val = buf.get_u8();
8307            *v = val;
8308        }
8309        __struct.roaming = buf.get_u8();
8310        let tmp = buf.get_u8();
8311        __struct.response =
8312            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8313                enum_type: "CellularConfigResponse",
8314                value: tmp as u32,
8315            })?;
8316        Ok(__struct)
8317    }
8318    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8319        let mut __tmp = BytesMut::new(bytes);
8320        #[allow(clippy::absurd_extreme_comparisons)]
8321        #[allow(unused_comparisons)]
8322        if __tmp.remaining() < Self::ENCODED_LEN {
8323            panic!(
8324                "buffer is too small (need {} bytes, but got {})",
8325                Self::ENCODED_LEN,
8326                __tmp.remaining(),
8327            )
8328        }
8329        __tmp.put_u8(self.enable_lte);
8330        __tmp.put_u8(self.enable_pin);
8331        for val in &self.pin {
8332            __tmp.put_u8(*val);
8333        }
8334        for val in &self.new_pin {
8335            __tmp.put_u8(*val);
8336        }
8337        for val in &self.apn {
8338            __tmp.put_u8(*val);
8339        }
8340        for val in &self.puk {
8341            __tmp.put_u8(*val);
8342        }
8343        __tmp.put_u8(self.roaming);
8344        __tmp.put_u8(self.response as u8);
8345        if matches!(version, MavlinkVersion::V2) {
8346            let len = __tmp.len();
8347            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8348        } else {
8349            __tmp.len()
8350        }
8351    }
8352}
8353#[doc = "id: 334"]
8354#[doc = "Report current used cellular network status."]
8355#[derive(Debug, Clone, PartialEq)]
8356#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8357#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8358pub struct CELLULAR_STATUS_DATA {
8359    #[doc = "Mobile country code. If unknown, set to UINT16_MAX"]
8360    pub mcc: u16,
8361    #[doc = "Mobile network code. If unknown, set to UINT16_MAX"]
8362    pub mnc: u16,
8363    #[doc = "Location area code. If unknown, set to 0"]
8364    pub lac: u16,
8365    #[doc = "Cellular modem status"]
8366    pub status: CellularStatusFlag,
8367    #[doc = "Failure reason when status in in CELLULAR_STATUS_FLAG_FAILED"]
8368    pub failure_reason: CellularNetworkFailedReason,
8369    #[doc = "Cellular network radio type: gsm, cdma, lte..."]
8370    pub mavtype: CellularNetworkRadioType,
8371    #[doc = "Signal quality in percent. If unknown, set to UINT8_MAX"]
8372    pub quality: u8,
8373}
8374impl CELLULAR_STATUS_DATA {
8375    pub const ENCODED_LEN: usize = 10usize;
8376    pub const DEFAULT: Self = Self {
8377        mcc: 0_u16,
8378        mnc: 0_u16,
8379        lac: 0_u16,
8380        status: CellularStatusFlag::DEFAULT,
8381        failure_reason: CellularNetworkFailedReason::DEFAULT,
8382        mavtype: CellularNetworkRadioType::DEFAULT,
8383        quality: 0_u8,
8384    };
8385    #[cfg(feature = "arbitrary")]
8386    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8387        use arbitrary::{Arbitrary, Unstructured};
8388        let mut buf = [0u8; 1024];
8389        rng.fill_bytes(&mut buf);
8390        let mut unstructured = Unstructured::new(&buf);
8391        Self::arbitrary(&mut unstructured).unwrap_or_default()
8392    }
8393}
8394impl Default for CELLULAR_STATUS_DATA {
8395    fn default() -> Self {
8396        Self::DEFAULT.clone()
8397    }
8398}
8399impl MessageData for CELLULAR_STATUS_DATA {
8400    type Message = MavMessage;
8401    const ID: u32 = 334u32;
8402    const NAME: &'static str = "CELLULAR_STATUS";
8403    const EXTRA_CRC: u8 = 72u8;
8404    const ENCODED_LEN: usize = 10usize;
8405    fn deser(
8406        _version: MavlinkVersion,
8407        __input: &[u8],
8408    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8409        let avail_len = __input.len();
8410        let mut payload_buf = [0; Self::ENCODED_LEN];
8411        let mut buf = if avail_len < Self::ENCODED_LEN {
8412            payload_buf[0..avail_len].copy_from_slice(__input);
8413            Bytes::new(&payload_buf)
8414        } else {
8415            Bytes::new(__input)
8416        };
8417        let mut __struct = Self::default();
8418        __struct.mcc = buf.get_u16_le();
8419        __struct.mnc = buf.get_u16_le();
8420        __struct.lac = buf.get_u16_le();
8421        let tmp = buf.get_u8();
8422        __struct.status =
8423            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8424                enum_type: "CellularStatusFlag",
8425                value: tmp as u32,
8426            })?;
8427        let tmp = buf.get_u8();
8428        __struct.failure_reason =
8429            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8430                enum_type: "CellularNetworkFailedReason",
8431                value: tmp as u32,
8432            })?;
8433        let tmp = buf.get_u8();
8434        __struct.mavtype =
8435            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8436                enum_type: "CellularNetworkRadioType",
8437                value: tmp as u32,
8438            })?;
8439        __struct.quality = buf.get_u8();
8440        Ok(__struct)
8441    }
8442    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8443        let mut __tmp = BytesMut::new(bytes);
8444        #[allow(clippy::absurd_extreme_comparisons)]
8445        #[allow(unused_comparisons)]
8446        if __tmp.remaining() < Self::ENCODED_LEN {
8447            panic!(
8448                "buffer is too small (need {} bytes, but got {})",
8449                Self::ENCODED_LEN,
8450                __tmp.remaining(),
8451            )
8452        }
8453        __tmp.put_u16_le(self.mcc);
8454        __tmp.put_u16_le(self.mnc);
8455        __tmp.put_u16_le(self.lac);
8456        __tmp.put_u8(self.status as u8);
8457        __tmp.put_u8(self.failure_reason as u8);
8458        __tmp.put_u8(self.mavtype as u8);
8459        __tmp.put_u8(self.quality);
8460        if matches!(version, MavlinkVersion::V2) {
8461            let len = __tmp.len();
8462            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8463        } else {
8464            __tmp.len()
8465        }
8466    }
8467}
8468#[doc = "id: 5"]
8469#[doc = "Request to control this MAV."]
8470#[derive(Debug, Clone, PartialEq)]
8471#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8472#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8473pub struct CHANGE_OPERATOR_CONTROL_DATA {
8474    #[doc = "System the GCS requests control for"]
8475    pub target_system: u8,
8476    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
8477    pub control_request: u8,
8478    #[doc = "0: key as plaintext, 1-255: future, different hashing/encryption variants. The GCS should in general use the safest mode possible initially and then gradually move down the encryption level if it gets a NACK message indicating an encryption mismatch."]
8479    pub version: u8,
8480    #[doc = "Password / Key, depending on version plaintext or encrypted. 25 or less characters, NULL terminated. The characters may involve A-Z, a-z, 0-9, and \"!?,.-\""]
8481    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8482    pub passkey: [u8; 25],
8483}
8484impl CHANGE_OPERATOR_CONTROL_DATA {
8485    pub const ENCODED_LEN: usize = 28usize;
8486    pub const DEFAULT: Self = Self {
8487        target_system: 0_u8,
8488        control_request: 0_u8,
8489        version: 0_u8,
8490        passkey: [0_u8; 25usize],
8491    };
8492    #[cfg(feature = "arbitrary")]
8493    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8494        use arbitrary::{Arbitrary, Unstructured};
8495        let mut buf = [0u8; 1024];
8496        rng.fill_bytes(&mut buf);
8497        let mut unstructured = Unstructured::new(&buf);
8498        Self::arbitrary(&mut unstructured).unwrap_or_default()
8499    }
8500}
8501impl Default for CHANGE_OPERATOR_CONTROL_DATA {
8502    fn default() -> Self {
8503        Self::DEFAULT.clone()
8504    }
8505}
8506impl MessageData for CHANGE_OPERATOR_CONTROL_DATA {
8507    type Message = MavMessage;
8508    const ID: u32 = 5u32;
8509    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL";
8510    const EXTRA_CRC: u8 = 217u8;
8511    const ENCODED_LEN: usize = 28usize;
8512    fn deser(
8513        _version: MavlinkVersion,
8514        __input: &[u8],
8515    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8516        let avail_len = __input.len();
8517        let mut payload_buf = [0; Self::ENCODED_LEN];
8518        let mut buf = if avail_len < Self::ENCODED_LEN {
8519            payload_buf[0..avail_len].copy_from_slice(__input);
8520            Bytes::new(&payload_buf)
8521        } else {
8522            Bytes::new(__input)
8523        };
8524        let mut __struct = Self::default();
8525        __struct.target_system = buf.get_u8();
8526        __struct.control_request = buf.get_u8();
8527        __struct.version = buf.get_u8();
8528        for v in &mut __struct.passkey {
8529            let val = buf.get_u8();
8530            *v = val;
8531        }
8532        Ok(__struct)
8533    }
8534    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8535        let mut __tmp = BytesMut::new(bytes);
8536        #[allow(clippy::absurd_extreme_comparisons)]
8537        #[allow(unused_comparisons)]
8538        if __tmp.remaining() < Self::ENCODED_LEN {
8539            panic!(
8540                "buffer is too small (need {} bytes, but got {})",
8541                Self::ENCODED_LEN,
8542                __tmp.remaining(),
8543            )
8544        }
8545        __tmp.put_u8(self.target_system);
8546        __tmp.put_u8(self.control_request);
8547        __tmp.put_u8(self.version);
8548        for val in &self.passkey {
8549            __tmp.put_u8(*val);
8550        }
8551        if matches!(version, MavlinkVersion::V2) {
8552            let len = __tmp.len();
8553            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8554        } else {
8555            __tmp.len()
8556        }
8557    }
8558}
8559#[doc = "id: 6"]
8560#[doc = "Accept / deny control of this MAV."]
8561#[derive(Debug, Clone, PartialEq)]
8562#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8563#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8564pub struct CHANGE_OPERATOR_CONTROL_ACK_DATA {
8565    #[doc = "ID of the GCS this message"]
8566    pub gcs_system_id: u8,
8567    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
8568    pub control_request: u8,
8569    #[doc = "0: ACK, 1: NACK: Wrong passkey, 2: NACK: Unsupported passkey encryption method, 3: NACK: Already under control"]
8570    pub ack: u8,
8571}
8572impl CHANGE_OPERATOR_CONTROL_ACK_DATA {
8573    pub const ENCODED_LEN: usize = 3usize;
8574    pub const DEFAULT: Self = Self {
8575        gcs_system_id: 0_u8,
8576        control_request: 0_u8,
8577        ack: 0_u8,
8578    };
8579    #[cfg(feature = "arbitrary")]
8580    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8581        use arbitrary::{Arbitrary, Unstructured};
8582        let mut buf = [0u8; 1024];
8583        rng.fill_bytes(&mut buf);
8584        let mut unstructured = Unstructured::new(&buf);
8585        Self::arbitrary(&mut unstructured).unwrap_or_default()
8586    }
8587}
8588impl Default for CHANGE_OPERATOR_CONTROL_ACK_DATA {
8589    fn default() -> Self {
8590        Self::DEFAULT.clone()
8591    }
8592}
8593impl MessageData for CHANGE_OPERATOR_CONTROL_ACK_DATA {
8594    type Message = MavMessage;
8595    const ID: u32 = 6u32;
8596    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL_ACK";
8597    const EXTRA_CRC: u8 = 104u8;
8598    const ENCODED_LEN: usize = 3usize;
8599    fn deser(
8600        _version: MavlinkVersion,
8601        __input: &[u8],
8602    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8603        let avail_len = __input.len();
8604        let mut payload_buf = [0; Self::ENCODED_LEN];
8605        let mut buf = if avail_len < Self::ENCODED_LEN {
8606            payload_buf[0..avail_len].copy_from_slice(__input);
8607            Bytes::new(&payload_buf)
8608        } else {
8609            Bytes::new(__input)
8610        };
8611        let mut __struct = Self::default();
8612        __struct.gcs_system_id = buf.get_u8();
8613        __struct.control_request = buf.get_u8();
8614        __struct.ack = buf.get_u8();
8615        Ok(__struct)
8616    }
8617    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8618        let mut __tmp = BytesMut::new(bytes);
8619        #[allow(clippy::absurd_extreme_comparisons)]
8620        #[allow(unused_comparisons)]
8621        if __tmp.remaining() < Self::ENCODED_LEN {
8622            panic!(
8623                "buffer is too small (need {} bytes, but got {})",
8624                Self::ENCODED_LEN,
8625                __tmp.remaining(),
8626            )
8627        }
8628        __tmp.put_u8(self.gcs_system_id);
8629        __tmp.put_u8(self.control_request);
8630        __tmp.put_u8(self.ack);
8631        if matches!(version, MavlinkVersion::V2) {
8632            let len = __tmp.len();
8633            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8634        } else {
8635            __tmp.len()
8636        }
8637    }
8638}
8639#[doc = "id: 247"]
8640#[doc = "Information about a potential collision."]
8641#[derive(Debug, Clone, PartialEq)]
8642#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8643#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8644pub struct COLLISION_DATA {
8645    #[doc = "Unique identifier, domain based on src field"]
8646    pub id: u32,
8647    #[doc = "Estimated time until collision occurs"]
8648    pub time_to_minimum_delta: f32,
8649    #[doc = "Closest vertical distance between vehicle and object"]
8650    pub altitude_minimum_delta: f32,
8651    #[doc = "Closest horizontal distance between vehicle and object"]
8652    pub horizontal_minimum_delta: f32,
8653    #[doc = "Collision data source"]
8654    pub src: MavCollisionSrc,
8655    #[doc = "Action that is being taken to avoid this collision"]
8656    pub action: MavCollisionAction,
8657    #[doc = "How concerned the aircraft is about this collision"]
8658    pub threat_level: MavCollisionThreatLevel,
8659}
8660impl COLLISION_DATA {
8661    pub const ENCODED_LEN: usize = 19usize;
8662    pub const DEFAULT: Self = Self {
8663        id: 0_u32,
8664        time_to_minimum_delta: 0.0_f32,
8665        altitude_minimum_delta: 0.0_f32,
8666        horizontal_minimum_delta: 0.0_f32,
8667        src: MavCollisionSrc::DEFAULT,
8668        action: MavCollisionAction::DEFAULT,
8669        threat_level: MavCollisionThreatLevel::DEFAULT,
8670    };
8671    #[cfg(feature = "arbitrary")]
8672    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8673        use arbitrary::{Arbitrary, Unstructured};
8674        let mut buf = [0u8; 1024];
8675        rng.fill_bytes(&mut buf);
8676        let mut unstructured = Unstructured::new(&buf);
8677        Self::arbitrary(&mut unstructured).unwrap_or_default()
8678    }
8679}
8680impl Default for COLLISION_DATA {
8681    fn default() -> Self {
8682        Self::DEFAULT.clone()
8683    }
8684}
8685impl MessageData for COLLISION_DATA {
8686    type Message = MavMessage;
8687    const ID: u32 = 247u32;
8688    const NAME: &'static str = "COLLISION";
8689    const EXTRA_CRC: u8 = 81u8;
8690    const ENCODED_LEN: usize = 19usize;
8691    fn deser(
8692        _version: MavlinkVersion,
8693        __input: &[u8],
8694    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8695        let avail_len = __input.len();
8696        let mut payload_buf = [0; Self::ENCODED_LEN];
8697        let mut buf = if avail_len < Self::ENCODED_LEN {
8698            payload_buf[0..avail_len].copy_from_slice(__input);
8699            Bytes::new(&payload_buf)
8700        } else {
8701            Bytes::new(__input)
8702        };
8703        let mut __struct = Self::default();
8704        __struct.id = buf.get_u32_le();
8705        __struct.time_to_minimum_delta = buf.get_f32_le();
8706        __struct.altitude_minimum_delta = buf.get_f32_le();
8707        __struct.horizontal_minimum_delta = buf.get_f32_le();
8708        let tmp = buf.get_u8();
8709        __struct.src =
8710            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8711                enum_type: "MavCollisionSrc",
8712                value: tmp as u32,
8713            })?;
8714        let tmp = buf.get_u8();
8715        __struct.action =
8716            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8717                enum_type: "MavCollisionAction",
8718                value: tmp as u32,
8719            })?;
8720        let tmp = buf.get_u8();
8721        __struct.threat_level =
8722            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8723                enum_type: "MavCollisionThreatLevel",
8724                value: tmp as u32,
8725            })?;
8726        Ok(__struct)
8727    }
8728    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8729        let mut __tmp = BytesMut::new(bytes);
8730        #[allow(clippy::absurd_extreme_comparisons)]
8731        #[allow(unused_comparisons)]
8732        if __tmp.remaining() < Self::ENCODED_LEN {
8733            panic!(
8734                "buffer is too small (need {} bytes, but got {})",
8735                Self::ENCODED_LEN,
8736                __tmp.remaining(),
8737            )
8738        }
8739        __tmp.put_u32_le(self.id);
8740        __tmp.put_f32_le(self.time_to_minimum_delta);
8741        __tmp.put_f32_le(self.altitude_minimum_delta);
8742        __tmp.put_f32_le(self.horizontal_minimum_delta);
8743        __tmp.put_u8(self.src as u8);
8744        __tmp.put_u8(self.action as u8);
8745        __tmp.put_u8(self.threat_level as u8);
8746        if matches!(version, MavlinkVersion::V2) {
8747            let len = __tmp.len();
8748            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8749        } else {
8750            __tmp.len()
8751        }
8752    }
8753}
8754#[doc = "id: 77"]
8755#[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
8756#[derive(Debug, Clone, PartialEq)]
8757#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8758#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8759pub struct COMMAND_ACK_DATA {
8760    #[doc = "Command ID (of acknowledged command)."]
8761    pub command: MavCmd,
8762    #[doc = "Result of command."]
8763    pub result: MavResult,
8764    #[doc = "The progress percentage when result is MAV_RESULT_IN_PROGRESS. Values: [0-100], or UINT8_MAX if the progress is unknown."]
8765    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8766    pub progress: u8,
8767    #[doc = "Additional result information. Can be set with a command-specific enum containing command-specific error reasons for why the command might be denied. If used, the associated enum must be documented in the corresponding MAV_CMD (this enum should have a 0 value to indicate \"unused\" or \"unknown\")."]
8768    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8769    pub result_param2: i32,
8770    #[doc = "System ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
8771    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8772    pub target_system: u8,
8773    #[doc = "Component ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
8774    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8775    pub target_component: u8,
8776}
8777impl COMMAND_ACK_DATA {
8778    pub const ENCODED_LEN: usize = 10usize;
8779    pub const DEFAULT: Self = Self {
8780        command: MavCmd::DEFAULT,
8781        result: MavResult::DEFAULT,
8782        progress: 0_u8,
8783        result_param2: 0_i32,
8784        target_system: 0_u8,
8785        target_component: 0_u8,
8786    };
8787    #[cfg(feature = "arbitrary")]
8788    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8789        use arbitrary::{Arbitrary, Unstructured};
8790        let mut buf = [0u8; 1024];
8791        rng.fill_bytes(&mut buf);
8792        let mut unstructured = Unstructured::new(&buf);
8793        Self::arbitrary(&mut unstructured).unwrap_or_default()
8794    }
8795}
8796impl Default for COMMAND_ACK_DATA {
8797    fn default() -> Self {
8798        Self::DEFAULT.clone()
8799    }
8800}
8801impl MessageData for COMMAND_ACK_DATA {
8802    type Message = MavMessage;
8803    const ID: u32 = 77u32;
8804    const NAME: &'static str = "COMMAND_ACK";
8805    const EXTRA_CRC: u8 = 143u8;
8806    const ENCODED_LEN: usize = 10usize;
8807    fn deser(
8808        _version: MavlinkVersion,
8809        __input: &[u8],
8810    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8811        let avail_len = __input.len();
8812        let mut payload_buf = [0; Self::ENCODED_LEN];
8813        let mut buf = if avail_len < Self::ENCODED_LEN {
8814            payload_buf[0..avail_len].copy_from_slice(__input);
8815            Bytes::new(&payload_buf)
8816        } else {
8817            Bytes::new(__input)
8818        };
8819        let mut __struct = Self::default();
8820        let tmp = buf.get_u16_le();
8821        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
8822            ::mavlink_core::error::ParserError::InvalidEnum {
8823                enum_type: "MavCmd",
8824                value: tmp as u32,
8825            },
8826        )?;
8827        let tmp = buf.get_u8();
8828        __struct.result =
8829            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8830                enum_type: "MavResult",
8831                value: tmp as u32,
8832            })?;
8833        __struct.progress = buf.get_u8();
8834        __struct.result_param2 = buf.get_i32_le();
8835        __struct.target_system = buf.get_u8();
8836        __struct.target_component = buf.get_u8();
8837        Ok(__struct)
8838    }
8839    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8840        let mut __tmp = BytesMut::new(bytes);
8841        #[allow(clippy::absurd_extreme_comparisons)]
8842        #[allow(unused_comparisons)]
8843        if __tmp.remaining() < Self::ENCODED_LEN {
8844            panic!(
8845                "buffer is too small (need {} bytes, but got {})",
8846                Self::ENCODED_LEN,
8847                __tmp.remaining(),
8848            )
8849        }
8850        __tmp.put_u16_le(self.command as u16);
8851        __tmp.put_u8(self.result as u8);
8852        __tmp.put_u8(self.progress);
8853        __tmp.put_i32_le(self.result_param2);
8854        __tmp.put_u8(self.target_system);
8855        __tmp.put_u8(self.target_component);
8856        if matches!(version, MavlinkVersion::V2) {
8857            let len = __tmp.len();
8858            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8859        } else {
8860            __tmp.len()
8861        }
8862    }
8863}
8864#[doc = "id: 80"]
8865#[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
8866#[derive(Debug, Clone, PartialEq)]
8867#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8868#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8869pub struct COMMAND_CANCEL_DATA {
8870    #[doc = "Command ID (of command to cancel)."]
8871    pub command: MavCmd,
8872    #[doc = "System executing long running command. Should not be broadcast (0)."]
8873    pub target_system: u8,
8874    #[doc = "Component executing long running command."]
8875    pub target_component: u8,
8876}
8877impl COMMAND_CANCEL_DATA {
8878    pub const ENCODED_LEN: usize = 4usize;
8879    pub const DEFAULT: Self = Self {
8880        command: MavCmd::DEFAULT,
8881        target_system: 0_u8,
8882        target_component: 0_u8,
8883    };
8884    #[cfg(feature = "arbitrary")]
8885    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8886        use arbitrary::{Arbitrary, Unstructured};
8887        let mut buf = [0u8; 1024];
8888        rng.fill_bytes(&mut buf);
8889        let mut unstructured = Unstructured::new(&buf);
8890        Self::arbitrary(&mut unstructured).unwrap_or_default()
8891    }
8892}
8893impl Default for COMMAND_CANCEL_DATA {
8894    fn default() -> Self {
8895        Self::DEFAULT.clone()
8896    }
8897}
8898impl MessageData for COMMAND_CANCEL_DATA {
8899    type Message = MavMessage;
8900    const ID: u32 = 80u32;
8901    const NAME: &'static str = "COMMAND_CANCEL";
8902    const EXTRA_CRC: u8 = 14u8;
8903    const ENCODED_LEN: usize = 4usize;
8904    fn deser(
8905        _version: MavlinkVersion,
8906        __input: &[u8],
8907    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8908        let avail_len = __input.len();
8909        let mut payload_buf = [0; Self::ENCODED_LEN];
8910        let mut buf = if avail_len < Self::ENCODED_LEN {
8911            payload_buf[0..avail_len].copy_from_slice(__input);
8912            Bytes::new(&payload_buf)
8913        } else {
8914            Bytes::new(__input)
8915        };
8916        let mut __struct = Self::default();
8917        let tmp = buf.get_u16_le();
8918        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
8919            ::mavlink_core::error::ParserError::InvalidEnum {
8920                enum_type: "MavCmd",
8921                value: tmp as u32,
8922            },
8923        )?;
8924        __struct.target_system = buf.get_u8();
8925        __struct.target_component = buf.get_u8();
8926        Ok(__struct)
8927    }
8928    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8929        let mut __tmp = BytesMut::new(bytes);
8930        #[allow(clippy::absurd_extreme_comparisons)]
8931        #[allow(unused_comparisons)]
8932        if __tmp.remaining() < Self::ENCODED_LEN {
8933            panic!(
8934                "buffer is too small (need {} bytes, but got {})",
8935                Self::ENCODED_LEN,
8936                __tmp.remaining(),
8937            )
8938        }
8939        __tmp.put_u16_le(self.command as u16);
8940        __tmp.put_u8(self.target_system);
8941        __tmp.put_u8(self.target_component);
8942        if matches!(version, MavlinkVersion::V2) {
8943            let len = __tmp.len();
8944            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8945        } else {
8946            __tmp.len()
8947        }
8948    }
8949}
8950#[doc = "id: 75"]
8951#[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
8952#[derive(Debug, Clone, PartialEq)]
8953#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8954#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8955pub struct COMMAND_INT_DATA {
8956    #[doc = "PARAM1, see MAV_CMD enum"]
8957    pub param1: f32,
8958    #[doc = "PARAM2, see MAV_CMD enum"]
8959    pub param2: f32,
8960    #[doc = "PARAM3, see MAV_CMD enum"]
8961    pub param3: f32,
8962    #[doc = "PARAM4, see MAV_CMD enum"]
8963    pub param4: f32,
8964    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
8965    pub x: i32,
8966    #[doc = "PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7"]
8967    pub y: i32,
8968    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame)."]
8969    pub z: f32,
8970    #[doc = "The scheduled action for the mission item."]
8971    pub command: MavCmd,
8972    #[doc = "System ID"]
8973    pub target_system: u8,
8974    #[doc = "Component ID"]
8975    pub target_component: u8,
8976    #[doc = "The coordinate system of the COMMAND."]
8977    pub frame: MavFrame,
8978    #[doc = "Not used."]
8979    pub current: u8,
8980    #[doc = "Not used (set 0)."]
8981    pub autocontinue: u8,
8982}
8983impl COMMAND_INT_DATA {
8984    pub const ENCODED_LEN: usize = 35usize;
8985    pub const DEFAULT: Self = Self {
8986        param1: 0.0_f32,
8987        param2: 0.0_f32,
8988        param3: 0.0_f32,
8989        param4: 0.0_f32,
8990        x: 0_i32,
8991        y: 0_i32,
8992        z: 0.0_f32,
8993        command: MavCmd::DEFAULT,
8994        target_system: 0_u8,
8995        target_component: 0_u8,
8996        frame: MavFrame::DEFAULT,
8997        current: 0_u8,
8998        autocontinue: 0_u8,
8999    };
9000    #[cfg(feature = "arbitrary")]
9001    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9002        use arbitrary::{Arbitrary, Unstructured};
9003        let mut buf = [0u8; 1024];
9004        rng.fill_bytes(&mut buf);
9005        let mut unstructured = Unstructured::new(&buf);
9006        Self::arbitrary(&mut unstructured).unwrap_or_default()
9007    }
9008}
9009impl Default for COMMAND_INT_DATA {
9010    fn default() -> Self {
9011        Self::DEFAULT.clone()
9012    }
9013}
9014impl MessageData for COMMAND_INT_DATA {
9015    type Message = MavMessage;
9016    const ID: u32 = 75u32;
9017    const NAME: &'static str = "COMMAND_INT";
9018    const EXTRA_CRC: u8 = 158u8;
9019    const ENCODED_LEN: usize = 35usize;
9020    fn deser(
9021        _version: MavlinkVersion,
9022        __input: &[u8],
9023    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9024        let avail_len = __input.len();
9025        let mut payload_buf = [0; Self::ENCODED_LEN];
9026        let mut buf = if avail_len < Self::ENCODED_LEN {
9027            payload_buf[0..avail_len].copy_from_slice(__input);
9028            Bytes::new(&payload_buf)
9029        } else {
9030            Bytes::new(__input)
9031        };
9032        let mut __struct = Self::default();
9033        __struct.param1 = buf.get_f32_le();
9034        __struct.param2 = buf.get_f32_le();
9035        __struct.param3 = buf.get_f32_le();
9036        __struct.param4 = buf.get_f32_le();
9037        __struct.x = buf.get_i32_le();
9038        __struct.y = buf.get_i32_le();
9039        __struct.z = buf.get_f32_le();
9040        let tmp = buf.get_u16_le();
9041        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9042            ::mavlink_core::error::ParserError::InvalidEnum {
9043                enum_type: "MavCmd",
9044                value: tmp as u32,
9045            },
9046        )?;
9047        __struct.target_system = buf.get_u8();
9048        __struct.target_component = buf.get_u8();
9049        let tmp = buf.get_u8();
9050        __struct.frame =
9051            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9052                enum_type: "MavFrame",
9053                value: tmp as u32,
9054            })?;
9055        __struct.current = buf.get_u8();
9056        __struct.autocontinue = buf.get_u8();
9057        Ok(__struct)
9058    }
9059    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9060        let mut __tmp = BytesMut::new(bytes);
9061        #[allow(clippy::absurd_extreme_comparisons)]
9062        #[allow(unused_comparisons)]
9063        if __tmp.remaining() < Self::ENCODED_LEN {
9064            panic!(
9065                "buffer is too small (need {} bytes, but got {})",
9066                Self::ENCODED_LEN,
9067                __tmp.remaining(),
9068            )
9069        }
9070        __tmp.put_f32_le(self.param1);
9071        __tmp.put_f32_le(self.param2);
9072        __tmp.put_f32_le(self.param3);
9073        __tmp.put_f32_le(self.param4);
9074        __tmp.put_i32_le(self.x);
9075        __tmp.put_i32_le(self.y);
9076        __tmp.put_f32_le(self.z);
9077        __tmp.put_u16_le(self.command as u16);
9078        __tmp.put_u8(self.target_system);
9079        __tmp.put_u8(self.target_component);
9080        __tmp.put_u8(self.frame as u8);
9081        __tmp.put_u8(self.current);
9082        __tmp.put_u8(self.autocontinue);
9083        if matches!(version, MavlinkVersion::V2) {
9084            let len = __tmp.len();
9085            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9086        } else {
9087            __tmp.len()
9088        }
9089    }
9090}
9091#[doc = "id: 76"]
9092#[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9093#[derive(Debug, Clone, PartialEq)]
9094#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9095#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9096pub struct COMMAND_LONG_DATA {
9097    #[doc = "Parameter 1 (for the specific command)."]
9098    pub param1: f32,
9099    #[doc = "Parameter 2 (for the specific command)."]
9100    pub param2: f32,
9101    #[doc = "Parameter 3 (for the specific command)."]
9102    pub param3: f32,
9103    #[doc = "Parameter 4 (for the specific command)."]
9104    pub param4: f32,
9105    #[doc = "Parameter 5 (for the specific command)."]
9106    pub param5: f32,
9107    #[doc = "Parameter 6 (for the specific command)."]
9108    pub param6: f32,
9109    #[doc = "Parameter 7 (for the specific command)."]
9110    pub param7: f32,
9111    #[doc = "Command ID (of command to send)."]
9112    pub command: MavCmd,
9113    #[doc = "System which should execute the command"]
9114    pub target_system: u8,
9115    #[doc = "Component which should execute the command, 0 for all components"]
9116    pub target_component: u8,
9117    #[doc = "0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)"]
9118    pub confirmation: u8,
9119}
9120impl COMMAND_LONG_DATA {
9121    pub const ENCODED_LEN: usize = 33usize;
9122    pub const DEFAULT: Self = Self {
9123        param1: 0.0_f32,
9124        param2: 0.0_f32,
9125        param3: 0.0_f32,
9126        param4: 0.0_f32,
9127        param5: 0.0_f32,
9128        param6: 0.0_f32,
9129        param7: 0.0_f32,
9130        command: MavCmd::DEFAULT,
9131        target_system: 0_u8,
9132        target_component: 0_u8,
9133        confirmation: 0_u8,
9134    };
9135    #[cfg(feature = "arbitrary")]
9136    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9137        use arbitrary::{Arbitrary, Unstructured};
9138        let mut buf = [0u8; 1024];
9139        rng.fill_bytes(&mut buf);
9140        let mut unstructured = Unstructured::new(&buf);
9141        Self::arbitrary(&mut unstructured).unwrap_or_default()
9142    }
9143}
9144impl Default for COMMAND_LONG_DATA {
9145    fn default() -> Self {
9146        Self::DEFAULT.clone()
9147    }
9148}
9149impl MessageData for COMMAND_LONG_DATA {
9150    type Message = MavMessage;
9151    const ID: u32 = 76u32;
9152    const NAME: &'static str = "COMMAND_LONG";
9153    const EXTRA_CRC: u8 = 152u8;
9154    const ENCODED_LEN: usize = 33usize;
9155    fn deser(
9156        _version: MavlinkVersion,
9157        __input: &[u8],
9158    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9159        let avail_len = __input.len();
9160        let mut payload_buf = [0; Self::ENCODED_LEN];
9161        let mut buf = if avail_len < Self::ENCODED_LEN {
9162            payload_buf[0..avail_len].copy_from_slice(__input);
9163            Bytes::new(&payload_buf)
9164        } else {
9165            Bytes::new(__input)
9166        };
9167        let mut __struct = Self::default();
9168        __struct.param1 = buf.get_f32_le();
9169        __struct.param2 = buf.get_f32_le();
9170        __struct.param3 = buf.get_f32_le();
9171        __struct.param4 = buf.get_f32_le();
9172        __struct.param5 = buf.get_f32_le();
9173        __struct.param6 = buf.get_f32_le();
9174        __struct.param7 = buf.get_f32_le();
9175        let tmp = buf.get_u16_le();
9176        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9177            ::mavlink_core::error::ParserError::InvalidEnum {
9178                enum_type: "MavCmd",
9179                value: tmp as u32,
9180            },
9181        )?;
9182        __struct.target_system = buf.get_u8();
9183        __struct.target_component = buf.get_u8();
9184        __struct.confirmation = buf.get_u8();
9185        Ok(__struct)
9186    }
9187    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9188        let mut __tmp = BytesMut::new(bytes);
9189        #[allow(clippy::absurd_extreme_comparisons)]
9190        #[allow(unused_comparisons)]
9191        if __tmp.remaining() < Self::ENCODED_LEN {
9192            panic!(
9193                "buffer is too small (need {} bytes, but got {})",
9194                Self::ENCODED_LEN,
9195                __tmp.remaining(),
9196            )
9197        }
9198        __tmp.put_f32_le(self.param1);
9199        __tmp.put_f32_le(self.param2);
9200        __tmp.put_f32_le(self.param3);
9201        __tmp.put_f32_le(self.param4);
9202        __tmp.put_f32_le(self.param5);
9203        __tmp.put_f32_le(self.param6);
9204        __tmp.put_f32_le(self.param7);
9205        __tmp.put_u16_le(self.command as u16);
9206        __tmp.put_u8(self.target_system);
9207        __tmp.put_u8(self.target_component);
9208        __tmp.put_u8(self.confirmation);
9209        if matches!(version, MavlinkVersion::V2) {
9210            let len = __tmp.len();
9211            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9212        } else {
9213            __tmp.len()
9214        }
9215    }
9216}
9217#[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
9218#[doc = "id: 395"]
9219#[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
9220#[derive(Debug, Clone, PartialEq)]
9221#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9222#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9223pub struct COMPONENT_INFORMATION_DATA {
9224    #[doc = "Timestamp (time since system boot)."]
9225    pub time_boot_ms: u32,
9226    #[doc = "CRC32 of the general metadata file (general_metadata_uri)."]
9227    pub general_metadata_file_crc: u32,
9228    #[doc = "CRC32 of peripherals metadata file (peripherals_metadata_uri)."]
9229    pub peripherals_metadata_file_crc: u32,
9230    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
9231    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9232    pub general_metadata_uri: [u8; 100],
9233    #[doc = "(Optional) MAVLink FTP URI for the peripherals metadata file (COMP_METADATA_TYPE_PERIPHERALS), which may be compressed with xz. This contains data about \"attached components\" such as UAVCAN nodes. The peripherals are in a separate file because the information must be generated dynamically at runtime. The string needs to be zero terminated."]
9234    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9235    pub peripherals_metadata_uri: [u8; 100],
9236}
9237impl COMPONENT_INFORMATION_DATA {
9238    pub const ENCODED_LEN: usize = 212usize;
9239    pub const DEFAULT: Self = Self {
9240        time_boot_ms: 0_u32,
9241        general_metadata_file_crc: 0_u32,
9242        peripherals_metadata_file_crc: 0_u32,
9243        general_metadata_uri: [0_u8; 100usize],
9244        peripherals_metadata_uri: [0_u8; 100usize],
9245    };
9246    #[cfg(feature = "arbitrary")]
9247    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9248        use arbitrary::{Arbitrary, Unstructured};
9249        let mut buf = [0u8; 1024];
9250        rng.fill_bytes(&mut buf);
9251        let mut unstructured = Unstructured::new(&buf);
9252        Self::arbitrary(&mut unstructured).unwrap_or_default()
9253    }
9254}
9255impl Default for COMPONENT_INFORMATION_DATA {
9256    fn default() -> Self {
9257        Self::DEFAULT.clone()
9258    }
9259}
9260impl MessageData for COMPONENT_INFORMATION_DATA {
9261    type Message = MavMessage;
9262    const ID: u32 = 395u32;
9263    const NAME: &'static str = "COMPONENT_INFORMATION";
9264    const EXTRA_CRC: u8 = 0u8;
9265    const ENCODED_LEN: usize = 212usize;
9266    fn deser(
9267        _version: MavlinkVersion,
9268        __input: &[u8],
9269    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9270        let avail_len = __input.len();
9271        let mut payload_buf = [0; Self::ENCODED_LEN];
9272        let mut buf = if avail_len < Self::ENCODED_LEN {
9273            payload_buf[0..avail_len].copy_from_slice(__input);
9274            Bytes::new(&payload_buf)
9275        } else {
9276            Bytes::new(__input)
9277        };
9278        let mut __struct = Self::default();
9279        __struct.time_boot_ms = buf.get_u32_le();
9280        __struct.general_metadata_file_crc = buf.get_u32_le();
9281        __struct.peripherals_metadata_file_crc = buf.get_u32_le();
9282        for v in &mut __struct.general_metadata_uri {
9283            let val = buf.get_u8();
9284            *v = val;
9285        }
9286        for v in &mut __struct.peripherals_metadata_uri {
9287            let val = buf.get_u8();
9288            *v = val;
9289        }
9290        Ok(__struct)
9291    }
9292    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9293        let mut __tmp = BytesMut::new(bytes);
9294        #[allow(clippy::absurd_extreme_comparisons)]
9295        #[allow(unused_comparisons)]
9296        if __tmp.remaining() < Self::ENCODED_LEN {
9297            panic!(
9298                "buffer is too small (need {} bytes, but got {})",
9299                Self::ENCODED_LEN,
9300                __tmp.remaining(),
9301            )
9302        }
9303        __tmp.put_u32_le(self.time_boot_ms);
9304        __tmp.put_u32_le(self.general_metadata_file_crc);
9305        __tmp.put_u32_le(self.peripherals_metadata_file_crc);
9306        for val in &self.general_metadata_uri {
9307            __tmp.put_u8(*val);
9308        }
9309        for val in &self.peripherals_metadata_uri {
9310            __tmp.put_u8(*val);
9311        }
9312        if matches!(version, MavlinkVersion::V2) {
9313            let len = __tmp.len();
9314            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9315        } else {
9316            __tmp.len()
9317        }
9318    }
9319}
9320#[doc = "id: 396"]
9321#[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
9322#[derive(Debug, Clone, PartialEq)]
9323#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9324#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9325pub struct COMPONENT_INFORMATION_BASIC_DATA {
9326    #[doc = "Component capability flags"]
9327    pub capabilities: MavProtocolCapability,
9328    #[doc = "Timestamp (time since system boot)."]
9329    pub time_boot_ms: u32,
9330    #[doc = "Date of manufacture as a UNIX Epoch time (since 1.1.1970) in seconds."]
9331    pub time_manufacture_s: u32,
9332    #[doc = "Name of the component vendor. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
9333    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9334    pub vendor_name: [u8; 32],
9335    #[doc = "Name of the component model. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
9336    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9337    pub model_name: [u8; 32],
9338    #[doc = "Software version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9339    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9340    pub software_version: [u8; 24],
9341    #[doc = "Hardware version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9342    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9343    pub hardware_version: [u8; 24],
9344    #[doc = "Hardware serial number. The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9345    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9346    pub serial_number: [u8; 32],
9347}
9348impl COMPONENT_INFORMATION_BASIC_DATA {
9349    pub const ENCODED_LEN: usize = 160usize;
9350    pub const DEFAULT: Self = Self {
9351        capabilities: MavProtocolCapability::DEFAULT,
9352        time_boot_ms: 0_u32,
9353        time_manufacture_s: 0_u32,
9354        vendor_name: [0_u8; 32usize],
9355        model_name: [0_u8; 32usize],
9356        software_version: [0_u8; 24usize],
9357        hardware_version: [0_u8; 24usize],
9358        serial_number: [0_u8; 32usize],
9359    };
9360    #[cfg(feature = "arbitrary")]
9361    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9362        use arbitrary::{Arbitrary, Unstructured};
9363        let mut buf = [0u8; 1024];
9364        rng.fill_bytes(&mut buf);
9365        let mut unstructured = Unstructured::new(&buf);
9366        Self::arbitrary(&mut unstructured).unwrap_or_default()
9367    }
9368}
9369impl Default for COMPONENT_INFORMATION_BASIC_DATA {
9370    fn default() -> Self {
9371        Self::DEFAULT.clone()
9372    }
9373}
9374impl MessageData for COMPONENT_INFORMATION_BASIC_DATA {
9375    type Message = MavMessage;
9376    const ID: u32 = 396u32;
9377    const NAME: &'static str = "COMPONENT_INFORMATION_BASIC";
9378    const EXTRA_CRC: u8 = 50u8;
9379    const ENCODED_LEN: usize = 160usize;
9380    fn deser(
9381        _version: MavlinkVersion,
9382        __input: &[u8],
9383    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9384        let avail_len = __input.len();
9385        let mut payload_buf = [0; Self::ENCODED_LEN];
9386        let mut buf = if avail_len < Self::ENCODED_LEN {
9387            payload_buf[0..avail_len].copy_from_slice(__input);
9388            Bytes::new(&payload_buf)
9389        } else {
9390            Bytes::new(__input)
9391        };
9392        let mut __struct = Self::default();
9393        let tmp = buf.get_u64_le();
9394        __struct.capabilities = MavProtocolCapability::from_bits(
9395            tmp & MavProtocolCapability::all().bits(),
9396        )
9397        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
9398            flag_type: "MavProtocolCapability",
9399            value: tmp as u32,
9400        })?;
9401        __struct.time_boot_ms = buf.get_u32_le();
9402        __struct.time_manufacture_s = buf.get_u32_le();
9403        for v in &mut __struct.vendor_name {
9404            let val = buf.get_u8();
9405            *v = val;
9406        }
9407        for v in &mut __struct.model_name {
9408            let val = buf.get_u8();
9409            *v = val;
9410        }
9411        for v in &mut __struct.software_version {
9412            let val = buf.get_u8();
9413            *v = val;
9414        }
9415        for v in &mut __struct.hardware_version {
9416            let val = buf.get_u8();
9417            *v = val;
9418        }
9419        for v in &mut __struct.serial_number {
9420            let val = buf.get_u8();
9421            *v = val;
9422        }
9423        Ok(__struct)
9424    }
9425    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9426        let mut __tmp = BytesMut::new(bytes);
9427        #[allow(clippy::absurd_extreme_comparisons)]
9428        #[allow(unused_comparisons)]
9429        if __tmp.remaining() < Self::ENCODED_LEN {
9430            panic!(
9431                "buffer is too small (need {} bytes, but got {})",
9432                Self::ENCODED_LEN,
9433                __tmp.remaining(),
9434            )
9435        }
9436        __tmp.put_u64_le(self.capabilities.bits());
9437        __tmp.put_u32_le(self.time_boot_ms);
9438        __tmp.put_u32_le(self.time_manufacture_s);
9439        for val in &self.vendor_name {
9440            __tmp.put_u8(*val);
9441        }
9442        for val in &self.model_name {
9443            __tmp.put_u8(*val);
9444        }
9445        for val in &self.software_version {
9446            __tmp.put_u8(*val);
9447        }
9448        for val in &self.hardware_version {
9449            __tmp.put_u8(*val);
9450        }
9451        for val in &self.serial_number {
9452            __tmp.put_u8(*val);
9453        }
9454        if matches!(version, MavlinkVersion::V2) {
9455            let len = __tmp.len();
9456            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9457        } else {
9458            __tmp.len()
9459        }
9460    }
9461}
9462#[doc = "id: 397"]
9463#[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
9464#[derive(Debug, Clone, PartialEq)]
9465#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9466#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9467pub struct COMPONENT_METADATA_DATA {
9468    #[doc = "Timestamp (time since system boot)."]
9469    pub time_boot_ms: u32,
9470    #[doc = "CRC32 of the general metadata file."]
9471    pub file_crc: u32,
9472    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
9473    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9474    pub uri: [u8; 100],
9475}
9476impl COMPONENT_METADATA_DATA {
9477    pub const ENCODED_LEN: usize = 108usize;
9478    pub const DEFAULT: Self = Self {
9479        time_boot_ms: 0_u32,
9480        file_crc: 0_u32,
9481        uri: [0_u8; 100usize],
9482    };
9483    #[cfg(feature = "arbitrary")]
9484    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9485        use arbitrary::{Arbitrary, Unstructured};
9486        let mut buf = [0u8; 1024];
9487        rng.fill_bytes(&mut buf);
9488        let mut unstructured = Unstructured::new(&buf);
9489        Self::arbitrary(&mut unstructured).unwrap_or_default()
9490    }
9491}
9492impl Default for COMPONENT_METADATA_DATA {
9493    fn default() -> Self {
9494        Self::DEFAULT.clone()
9495    }
9496}
9497impl MessageData for COMPONENT_METADATA_DATA {
9498    type Message = MavMessage;
9499    const ID: u32 = 397u32;
9500    const NAME: &'static str = "COMPONENT_METADATA";
9501    const EXTRA_CRC: u8 = 182u8;
9502    const ENCODED_LEN: usize = 108usize;
9503    fn deser(
9504        _version: MavlinkVersion,
9505        __input: &[u8],
9506    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9507        let avail_len = __input.len();
9508        let mut payload_buf = [0; Self::ENCODED_LEN];
9509        let mut buf = if avail_len < Self::ENCODED_LEN {
9510            payload_buf[0..avail_len].copy_from_slice(__input);
9511            Bytes::new(&payload_buf)
9512        } else {
9513            Bytes::new(__input)
9514        };
9515        let mut __struct = Self::default();
9516        __struct.time_boot_ms = buf.get_u32_le();
9517        __struct.file_crc = buf.get_u32_le();
9518        for v in &mut __struct.uri {
9519            let val = buf.get_u8();
9520            *v = val;
9521        }
9522        Ok(__struct)
9523    }
9524    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9525        let mut __tmp = BytesMut::new(bytes);
9526        #[allow(clippy::absurd_extreme_comparisons)]
9527        #[allow(unused_comparisons)]
9528        if __tmp.remaining() < Self::ENCODED_LEN {
9529            panic!(
9530                "buffer is too small (need {} bytes, but got {})",
9531                Self::ENCODED_LEN,
9532                __tmp.remaining(),
9533            )
9534        }
9535        __tmp.put_u32_le(self.time_boot_ms);
9536        __tmp.put_u32_le(self.file_crc);
9537        for val in &self.uri {
9538            __tmp.put_u8(*val);
9539        }
9540        if matches!(version, MavlinkVersion::V2) {
9541            let len = __tmp.len();
9542            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9543        } else {
9544            __tmp.len()
9545        }
9546    }
9547}
9548#[doc = "id: 146"]
9549#[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
9550#[derive(Debug, Clone, PartialEq)]
9551#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9552#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9553pub struct CONTROL_SYSTEM_STATE_DATA {
9554    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
9555    pub time_usec: u64,
9556    #[doc = "X acceleration in body frame"]
9557    pub x_acc: f32,
9558    #[doc = "Y acceleration in body frame"]
9559    pub y_acc: f32,
9560    #[doc = "Z acceleration in body frame"]
9561    pub z_acc: f32,
9562    #[doc = "X velocity in body frame"]
9563    pub x_vel: f32,
9564    #[doc = "Y velocity in body frame"]
9565    pub y_vel: f32,
9566    #[doc = "Z velocity in body frame"]
9567    pub z_vel: f32,
9568    #[doc = "X position in local frame"]
9569    pub x_pos: f32,
9570    #[doc = "Y position in local frame"]
9571    pub y_pos: f32,
9572    #[doc = "Z position in local frame"]
9573    pub z_pos: f32,
9574    #[doc = "Airspeed, set to -1 if unknown"]
9575    pub airspeed: f32,
9576    #[doc = "Variance of body velocity estimate"]
9577    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9578    pub vel_variance: [f32; 3],
9579    #[doc = "Variance in local position"]
9580    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9581    pub pos_variance: [f32; 3],
9582    #[doc = "The attitude, represented as Quaternion"]
9583    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9584    pub q: [f32; 4],
9585    #[doc = "Angular rate in roll axis"]
9586    pub roll_rate: f32,
9587    #[doc = "Angular rate in pitch axis"]
9588    pub pitch_rate: f32,
9589    #[doc = "Angular rate in yaw axis"]
9590    pub yaw_rate: f32,
9591}
9592impl CONTROL_SYSTEM_STATE_DATA {
9593    pub const ENCODED_LEN: usize = 100usize;
9594    pub const DEFAULT: Self = Self {
9595        time_usec: 0_u64,
9596        x_acc: 0.0_f32,
9597        y_acc: 0.0_f32,
9598        z_acc: 0.0_f32,
9599        x_vel: 0.0_f32,
9600        y_vel: 0.0_f32,
9601        z_vel: 0.0_f32,
9602        x_pos: 0.0_f32,
9603        y_pos: 0.0_f32,
9604        z_pos: 0.0_f32,
9605        airspeed: 0.0_f32,
9606        vel_variance: [0.0_f32; 3usize],
9607        pos_variance: [0.0_f32; 3usize],
9608        q: [0.0_f32; 4usize],
9609        roll_rate: 0.0_f32,
9610        pitch_rate: 0.0_f32,
9611        yaw_rate: 0.0_f32,
9612    };
9613    #[cfg(feature = "arbitrary")]
9614    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9615        use arbitrary::{Arbitrary, Unstructured};
9616        let mut buf = [0u8; 1024];
9617        rng.fill_bytes(&mut buf);
9618        let mut unstructured = Unstructured::new(&buf);
9619        Self::arbitrary(&mut unstructured).unwrap_or_default()
9620    }
9621}
9622impl Default for CONTROL_SYSTEM_STATE_DATA {
9623    fn default() -> Self {
9624        Self::DEFAULT.clone()
9625    }
9626}
9627impl MessageData for CONTROL_SYSTEM_STATE_DATA {
9628    type Message = MavMessage;
9629    const ID: u32 = 146u32;
9630    const NAME: &'static str = "CONTROL_SYSTEM_STATE";
9631    const EXTRA_CRC: u8 = 103u8;
9632    const ENCODED_LEN: usize = 100usize;
9633    fn deser(
9634        _version: MavlinkVersion,
9635        __input: &[u8],
9636    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9637        let avail_len = __input.len();
9638        let mut payload_buf = [0; Self::ENCODED_LEN];
9639        let mut buf = if avail_len < Self::ENCODED_LEN {
9640            payload_buf[0..avail_len].copy_from_slice(__input);
9641            Bytes::new(&payload_buf)
9642        } else {
9643            Bytes::new(__input)
9644        };
9645        let mut __struct = Self::default();
9646        __struct.time_usec = buf.get_u64_le();
9647        __struct.x_acc = buf.get_f32_le();
9648        __struct.y_acc = buf.get_f32_le();
9649        __struct.z_acc = buf.get_f32_le();
9650        __struct.x_vel = buf.get_f32_le();
9651        __struct.y_vel = buf.get_f32_le();
9652        __struct.z_vel = buf.get_f32_le();
9653        __struct.x_pos = buf.get_f32_le();
9654        __struct.y_pos = buf.get_f32_le();
9655        __struct.z_pos = buf.get_f32_le();
9656        __struct.airspeed = buf.get_f32_le();
9657        for v in &mut __struct.vel_variance {
9658            let val = buf.get_f32_le();
9659            *v = val;
9660        }
9661        for v in &mut __struct.pos_variance {
9662            let val = buf.get_f32_le();
9663            *v = val;
9664        }
9665        for v in &mut __struct.q {
9666            let val = buf.get_f32_le();
9667            *v = val;
9668        }
9669        __struct.roll_rate = buf.get_f32_le();
9670        __struct.pitch_rate = buf.get_f32_le();
9671        __struct.yaw_rate = buf.get_f32_le();
9672        Ok(__struct)
9673    }
9674    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9675        let mut __tmp = BytesMut::new(bytes);
9676        #[allow(clippy::absurd_extreme_comparisons)]
9677        #[allow(unused_comparisons)]
9678        if __tmp.remaining() < Self::ENCODED_LEN {
9679            panic!(
9680                "buffer is too small (need {} bytes, but got {})",
9681                Self::ENCODED_LEN,
9682                __tmp.remaining(),
9683            )
9684        }
9685        __tmp.put_u64_le(self.time_usec);
9686        __tmp.put_f32_le(self.x_acc);
9687        __tmp.put_f32_le(self.y_acc);
9688        __tmp.put_f32_le(self.z_acc);
9689        __tmp.put_f32_le(self.x_vel);
9690        __tmp.put_f32_le(self.y_vel);
9691        __tmp.put_f32_le(self.z_vel);
9692        __tmp.put_f32_le(self.x_pos);
9693        __tmp.put_f32_le(self.y_pos);
9694        __tmp.put_f32_le(self.z_pos);
9695        __tmp.put_f32_le(self.airspeed);
9696        for val in &self.vel_variance {
9697            __tmp.put_f32_le(*val);
9698        }
9699        for val in &self.pos_variance {
9700            __tmp.put_f32_le(*val);
9701        }
9702        for val in &self.q {
9703            __tmp.put_f32_le(*val);
9704        }
9705        __tmp.put_f32_le(self.roll_rate);
9706        __tmp.put_f32_le(self.pitch_rate);
9707        __tmp.put_f32_le(self.yaw_rate);
9708        if matches!(version, MavlinkVersion::V2) {
9709            let len = __tmp.len();
9710            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9711        } else {
9712            __tmp.len()
9713        }
9714    }
9715}
9716#[doc = "id: 411"]
9717#[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
9718#[derive(Debug, Clone, PartialEq)]
9719#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9720#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9721pub struct CURRENT_EVENT_SEQUENCE_DATA {
9722    #[doc = "Sequence number."]
9723    pub sequence: u16,
9724    #[doc = "Flag bitset."]
9725    pub flags: MavEventCurrentSequenceFlags,
9726}
9727impl CURRENT_EVENT_SEQUENCE_DATA {
9728    pub const ENCODED_LEN: usize = 3usize;
9729    pub const DEFAULT: Self = Self {
9730        sequence: 0_u16,
9731        flags: MavEventCurrentSequenceFlags::DEFAULT,
9732    };
9733    #[cfg(feature = "arbitrary")]
9734    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9735        use arbitrary::{Arbitrary, Unstructured};
9736        let mut buf = [0u8; 1024];
9737        rng.fill_bytes(&mut buf);
9738        let mut unstructured = Unstructured::new(&buf);
9739        Self::arbitrary(&mut unstructured).unwrap_or_default()
9740    }
9741}
9742impl Default for CURRENT_EVENT_SEQUENCE_DATA {
9743    fn default() -> Self {
9744        Self::DEFAULT.clone()
9745    }
9746}
9747impl MessageData for CURRENT_EVENT_SEQUENCE_DATA {
9748    type Message = MavMessage;
9749    const ID: u32 = 411u32;
9750    const NAME: &'static str = "CURRENT_EVENT_SEQUENCE";
9751    const EXTRA_CRC: u8 = 106u8;
9752    const ENCODED_LEN: usize = 3usize;
9753    fn deser(
9754        _version: MavlinkVersion,
9755        __input: &[u8],
9756    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9757        let avail_len = __input.len();
9758        let mut payload_buf = [0; Self::ENCODED_LEN];
9759        let mut buf = if avail_len < Self::ENCODED_LEN {
9760            payload_buf[0..avail_len].copy_from_slice(__input);
9761            Bytes::new(&payload_buf)
9762        } else {
9763            Bytes::new(__input)
9764        };
9765        let mut __struct = Self::default();
9766        __struct.sequence = buf.get_u16_le();
9767        let tmp = buf.get_u8();
9768        __struct.flags =
9769            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9770                enum_type: "MavEventCurrentSequenceFlags",
9771                value: tmp as u32,
9772            })?;
9773        Ok(__struct)
9774    }
9775    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9776        let mut __tmp = BytesMut::new(bytes);
9777        #[allow(clippy::absurd_extreme_comparisons)]
9778        #[allow(unused_comparisons)]
9779        if __tmp.remaining() < Self::ENCODED_LEN {
9780            panic!(
9781                "buffer is too small (need {} bytes, but got {})",
9782                Self::ENCODED_LEN,
9783                __tmp.remaining(),
9784            )
9785        }
9786        __tmp.put_u16_le(self.sequence);
9787        __tmp.put_u8(self.flags as u8);
9788        if matches!(version, MavlinkVersion::V2) {
9789            let len = __tmp.len();
9790            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9791        } else {
9792            __tmp.len()
9793        }
9794    }
9795}
9796#[doc = "id: 436"]
9797#[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
9798#[derive(Debug, Clone, PartialEq)]
9799#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9800#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9801pub struct CURRENT_MODE_DATA {
9802    #[doc = "A bitfield for use for autopilot-specific flags"]
9803    pub custom_mode: u32,
9804    #[doc = "The custom_mode of the mode that was last commanded by the user (for example, with MAV_CMD_DO_SET_STANDARD_MODE, MAV_CMD_DO_SET_MODE or via RC). This should usually be the same as custom_mode. It will be different if the vehicle is unable to enter the intended mode, or has left that mode due to a failsafe condition. 0 indicates the intended custom mode is unknown/not supplied"]
9805    pub intended_custom_mode: u32,
9806    #[doc = "Standard mode."]
9807    pub standard_mode: MavStandardMode,
9808}
9809impl CURRENT_MODE_DATA {
9810    pub const ENCODED_LEN: usize = 9usize;
9811    pub const DEFAULT: Self = Self {
9812        custom_mode: 0_u32,
9813        intended_custom_mode: 0_u32,
9814        standard_mode: MavStandardMode::DEFAULT,
9815    };
9816    #[cfg(feature = "arbitrary")]
9817    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9818        use arbitrary::{Arbitrary, Unstructured};
9819        let mut buf = [0u8; 1024];
9820        rng.fill_bytes(&mut buf);
9821        let mut unstructured = Unstructured::new(&buf);
9822        Self::arbitrary(&mut unstructured).unwrap_or_default()
9823    }
9824}
9825impl Default for CURRENT_MODE_DATA {
9826    fn default() -> Self {
9827        Self::DEFAULT.clone()
9828    }
9829}
9830impl MessageData for CURRENT_MODE_DATA {
9831    type Message = MavMessage;
9832    const ID: u32 = 436u32;
9833    const NAME: &'static str = "CURRENT_MODE";
9834    const EXTRA_CRC: u8 = 193u8;
9835    const ENCODED_LEN: usize = 9usize;
9836    fn deser(
9837        _version: MavlinkVersion,
9838        __input: &[u8],
9839    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9840        let avail_len = __input.len();
9841        let mut payload_buf = [0; Self::ENCODED_LEN];
9842        let mut buf = if avail_len < Self::ENCODED_LEN {
9843            payload_buf[0..avail_len].copy_from_slice(__input);
9844            Bytes::new(&payload_buf)
9845        } else {
9846            Bytes::new(__input)
9847        };
9848        let mut __struct = Self::default();
9849        __struct.custom_mode = buf.get_u32_le();
9850        __struct.intended_custom_mode = buf.get_u32_le();
9851        let tmp = buf.get_u8();
9852        __struct.standard_mode =
9853            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9854                enum_type: "MavStandardMode",
9855                value: tmp as u32,
9856            })?;
9857        Ok(__struct)
9858    }
9859    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9860        let mut __tmp = BytesMut::new(bytes);
9861        #[allow(clippy::absurd_extreme_comparisons)]
9862        #[allow(unused_comparisons)]
9863        if __tmp.remaining() < Self::ENCODED_LEN {
9864            panic!(
9865                "buffer is too small (need {} bytes, but got {})",
9866                Self::ENCODED_LEN,
9867                __tmp.remaining(),
9868            )
9869        }
9870        __tmp.put_u32_le(self.custom_mode);
9871        __tmp.put_u32_le(self.intended_custom_mode);
9872        __tmp.put_u8(self.standard_mode as u8);
9873        if matches!(version, MavlinkVersion::V2) {
9874            let len = __tmp.len();
9875            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9876        } else {
9877            __tmp.len()
9878        }
9879    }
9880}
9881#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
9882#[doc = "id: 67"]
9883#[doc = "Data stream status information."]
9884#[derive(Debug, Clone, PartialEq)]
9885#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9886#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9887pub struct DATA_STREAM_DATA {
9888    #[doc = "The message rate"]
9889    pub message_rate: u16,
9890    #[doc = "The ID of the requested data stream"]
9891    pub stream_id: u8,
9892    #[doc = "1 stream is enabled, 0 stream is stopped."]
9893    pub on_off: u8,
9894}
9895impl DATA_STREAM_DATA {
9896    pub const ENCODED_LEN: usize = 4usize;
9897    pub const DEFAULT: Self = Self {
9898        message_rate: 0_u16,
9899        stream_id: 0_u8,
9900        on_off: 0_u8,
9901    };
9902    #[cfg(feature = "arbitrary")]
9903    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9904        use arbitrary::{Arbitrary, Unstructured};
9905        let mut buf = [0u8; 1024];
9906        rng.fill_bytes(&mut buf);
9907        let mut unstructured = Unstructured::new(&buf);
9908        Self::arbitrary(&mut unstructured).unwrap_or_default()
9909    }
9910}
9911impl Default for DATA_STREAM_DATA {
9912    fn default() -> Self {
9913        Self::DEFAULT.clone()
9914    }
9915}
9916impl MessageData for DATA_STREAM_DATA {
9917    type Message = MavMessage;
9918    const ID: u32 = 67u32;
9919    const NAME: &'static str = "DATA_STREAM";
9920    const EXTRA_CRC: u8 = 21u8;
9921    const ENCODED_LEN: usize = 4usize;
9922    fn deser(
9923        _version: MavlinkVersion,
9924        __input: &[u8],
9925    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9926        let avail_len = __input.len();
9927        let mut payload_buf = [0; Self::ENCODED_LEN];
9928        let mut buf = if avail_len < Self::ENCODED_LEN {
9929            payload_buf[0..avail_len].copy_from_slice(__input);
9930            Bytes::new(&payload_buf)
9931        } else {
9932            Bytes::new(__input)
9933        };
9934        let mut __struct = Self::default();
9935        __struct.message_rate = buf.get_u16_le();
9936        __struct.stream_id = buf.get_u8();
9937        __struct.on_off = buf.get_u8();
9938        Ok(__struct)
9939    }
9940    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9941        let mut __tmp = BytesMut::new(bytes);
9942        #[allow(clippy::absurd_extreme_comparisons)]
9943        #[allow(unused_comparisons)]
9944        if __tmp.remaining() < Self::ENCODED_LEN {
9945            panic!(
9946                "buffer is too small (need {} bytes, but got {})",
9947                Self::ENCODED_LEN,
9948                __tmp.remaining(),
9949            )
9950        }
9951        __tmp.put_u16_le(self.message_rate);
9952        __tmp.put_u8(self.stream_id);
9953        __tmp.put_u8(self.on_off);
9954        if matches!(version, MavlinkVersion::V2) {
9955            let len = __tmp.len();
9956            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9957        } else {
9958            __tmp.len()
9959        }
9960    }
9961}
9962#[doc = "id: 130"]
9963#[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
9964#[derive(Debug, Clone, PartialEq)]
9965#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9966#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9967pub struct DATA_TRANSMISSION_HANDSHAKE_DATA {
9968    #[doc = "total data size (set on ACK only)."]
9969    pub size: u32,
9970    #[doc = "Width of a matrix or image."]
9971    pub width: u16,
9972    #[doc = "Height of a matrix or image."]
9973    pub height: u16,
9974    #[doc = "Number of packets being sent (set on ACK only)."]
9975    pub packets: u16,
9976    #[doc = "Type of requested/acknowledged data."]
9977    pub mavtype: MavlinkDataStreamType,
9978    #[doc = "Payload size per packet (normally 253 byte, see DATA field size in message ENCAPSULATED_DATA) (set on ACK only)."]
9979    pub payload: u8,
9980    #[doc = "JPEG quality. Values: [1-100]."]
9981    pub jpg_quality: u8,
9982}
9983impl DATA_TRANSMISSION_HANDSHAKE_DATA {
9984    pub const ENCODED_LEN: usize = 13usize;
9985    pub const DEFAULT: Self = Self {
9986        size: 0_u32,
9987        width: 0_u16,
9988        height: 0_u16,
9989        packets: 0_u16,
9990        mavtype: MavlinkDataStreamType::DEFAULT,
9991        payload: 0_u8,
9992        jpg_quality: 0_u8,
9993    };
9994    #[cfg(feature = "arbitrary")]
9995    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9996        use arbitrary::{Arbitrary, Unstructured};
9997        let mut buf = [0u8; 1024];
9998        rng.fill_bytes(&mut buf);
9999        let mut unstructured = Unstructured::new(&buf);
10000        Self::arbitrary(&mut unstructured).unwrap_or_default()
10001    }
10002}
10003impl Default for DATA_TRANSMISSION_HANDSHAKE_DATA {
10004    fn default() -> Self {
10005        Self::DEFAULT.clone()
10006    }
10007}
10008impl MessageData for DATA_TRANSMISSION_HANDSHAKE_DATA {
10009    type Message = MavMessage;
10010    const ID: u32 = 130u32;
10011    const NAME: &'static str = "DATA_TRANSMISSION_HANDSHAKE";
10012    const EXTRA_CRC: u8 = 29u8;
10013    const ENCODED_LEN: usize = 13usize;
10014    fn deser(
10015        _version: MavlinkVersion,
10016        __input: &[u8],
10017    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10018        let avail_len = __input.len();
10019        let mut payload_buf = [0; Self::ENCODED_LEN];
10020        let mut buf = if avail_len < Self::ENCODED_LEN {
10021            payload_buf[0..avail_len].copy_from_slice(__input);
10022            Bytes::new(&payload_buf)
10023        } else {
10024            Bytes::new(__input)
10025        };
10026        let mut __struct = Self::default();
10027        __struct.size = buf.get_u32_le();
10028        __struct.width = buf.get_u16_le();
10029        __struct.height = buf.get_u16_le();
10030        __struct.packets = buf.get_u16_le();
10031        let tmp = buf.get_u8();
10032        __struct.mavtype =
10033            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10034                enum_type: "MavlinkDataStreamType",
10035                value: tmp as u32,
10036            })?;
10037        __struct.payload = buf.get_u8();
10038        __struct.jpg_quality = buf.get_u8();
10039        Ok(__struct)
10040    }
10041    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10042        let mut __tmp = BytesMut::new(bytes);
10043        #[allow(clippy::absurd_extreme_comparisons)]
10044        #[allow(unused_comparisons)]
10045        if __tmp.remaining() < Self::ENCODED_LEN {
10046            panic!(
10047                "buffer is too small (need {} bytes, but got {})",
10048                Self::ENCODED_LEN,
10049                __tmp.remaining(),
10050            )
10051        }
10052        __tmp.put_u32_le(self.size);
10053        __tmp.put_u16_le(self.width);
10054        __tmp.put_u16_le(self.height);
10055        __tmp.put_u16_le(self.packets);
10056        __tmp.put_u8(self.mavtype as u8);
10057        __tmp.put_u8(self.payload);
10058        __tmp.put_u8(self.jpg_quality);
10059        if matches!(version, MavlinkVersion::V2) {
10060            let len = __tmp.len();
10061            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10062        } else {
10063            __tmp.len()
10064        }
10065    }
10066}
10067#[doc = "id: 254"]
10068#[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
10069#[derive(Debug, Clone, PartialEq)]
10070#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10071#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10072pub struct DEBUG_DATA {
10073    #[doc = "Timestamp (time since system boot)."]
10074    pub time_boot_ms: u32,
10075    #[doc = "DEBUG value"]
10076    pub value: f32,
10077    #[doc = "index of debug variable"]
10078    pub ind: u8,
10079}
10080impl DEBUG_DATA {
10081    pub const ENCODED_LEN: usize = 9usize;
10082    pub const DEFAULT: Self = Self {
10083        time_boot_ms: 0_u32,
10084        value: 0.0_f32,
10085        ind: 0_u8,
10086    };
10087    #[cfg(feature = "arbitrary")]
10088    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10089        use arbitrary::{Arbitrary, Unstructured};
10090        let mut buf = [0u8; 1024];
10091        rng.fill_bytes(&mut buf);
10092        let mut unstructured = Unstructured::new(&buf);
10093        Self::arbitrary(&mut unstructured).unwrap_or_default()
10094    }
10095}
10096impl Default for DEBUG_DATA {
10097    fn default() -> Self {
10098        Self::DEFAULT.clone()
10099    }
10100}
10101impl MessageData for DEBUG_DATA {
10102    type Message = MavMessage;
10103    const ID: u32 = 254u32;
10104    const NAME: &'static str = "DEBUG";
10105    const EXTRA_CRC: u8 = 46u8;
10106    const ENCODED_LEN: usize = 9usize;
10107    fn deser(
10108        _version: MavlinkVersion,
10109        __input: &[u8],
10110    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10111        let avail_len = __input.len();
10112        let mut payload_buf = [0; Self::ENCODED_LEN];
10113        let mut buf = if avail_len < Self::ENCODED_LEN {
10114            payload_buf[0..avail_len].copy_from_slice(__input);
10115            Bytes::new(&payload_buf)
10116        } else {
10117            Bytes::new(__input)
10118        };
10119        let mut __struct = Self::default();
10120        __struct.time_boot_ms = buf.get_u32_le();
10121        __struct.value = buf.get_f32_le();
10122        __struct.ind = buf.get_u8();
10123        Ok(__struct)
10124    }
10125    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10126        let mut __tmp = BytesMut::new(bytes);
10127        #[allow(clippy::absurd_extreme_comparisons)]
10128        #[allow(unused_comparisons)]
10129        if __tmp.remaining() < Self::ENCODED_LEN {
10130            panic!(
10131                "buffer is too small (need {} bytes, but got {})",
10132                Self::ENCODED_LEN,
10133                __tmp.remaining(),
10134            )
10135        }
10136        __tmp.put_u32_le(self.time_boot_ms);
10137        __tmp.put_f32_le(self.value);
10138        __tmp.put_u8(self.ind);
10139        if matches!(version, MavlinkVersion::V2) {
10140            let len = __tmp.len();
10141            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10142        } else {
10143            __tmp.len()
10144        }
10145    }
10146}
10147#[doc = "id: 350"]
10148#[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
10149#[derive(Debug, Clone, PartialEq)]
10150#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10151#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10152pub struct DEBUG_FLOAT_ARRAY_DATA {
10153    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10154    pub time_usec: u64,
10155    #[doc = "Unique ID used to discriminate between arrays"]
10156    pub array_id: u16,
10157    #[doc = "Name, for human-friendly display in a Ground Control Station"]
10158    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10159    pub name: [u8; 10],
10160    #[doc = "data"]
10161    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10162    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10163    pub data: [f32; 58],
10164}
10165impl DEBUG_FLOAT_ARRAY_DATA {
10166    pub const ENCODED_LEN: usize = 252usize;
10167    pub const DEFAULT: Self = Self {
10168        time_usec: 0_u64,
10169        array_id: 0_u16,
10170        name: [0_u8; 10usize],
10171        data: [0.0_f32; 58usize],
10172    };
10173    #[cfg(feature = "arbitrary")]
10174    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10175        use arbitrary::{Arbitrary, Unstructured};
10176        let mut buf = [0u8; 1024];
10177        rng.fill_bytes(&mut buf);
10178        let mut unstructured = Unstructured::new(&buf);
10179        Self::arbitrary(&mut unstructured).unwrap_or_default()
10180    }
10181}
10182impl Default for DEBUG_FLOAT_ARRAY_DATA {
10183    fn default() -> Self {
10184        Self::DEFAULT.clone()
10185    }
10186}
10187impl MessageData for DEBUG_FLOAT_ARRAY_DATA {
10188    type Message = MavMessage;
10189    const ID: u32 = 350u32;
10190    const NAME: &'static str = "DEBUG_FLOAT_ARRAY";
10191    const EXTRA_CRC: u8 = 232u8;
10192    const ENCODED_LEN: usize = 252usize;
10193    fn deser(
10194        _version: MavlinkVersion,
10195        __input: &[u8],
10196    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10197        let avail_len = __input.len();
10198        let mut payload_buf = [0; Self::ENCODED_LEN];
10199        let mut buf = if avail_len < Self::ENCODED_LEN {
10200            payload_buf[0..avail_len].copy_from_slice(__input);
10201            Bytes::new(&payload_buf)
10202        } else {
10203            Bytes::new(__input)
10204        };
10205        let mut __struct = Self::default();
10206        __struct.time_usec = buf.get_u64_le();
10207        __struct.array_id = buf.get_u16_le();
10208        for v in &mut __struct.name {
10209            let val = buf.get_u8();
10210            *v = val;
10211        }
10212        for v in &mut __struct.data {
10213            let val = buf.get_f32_le();
10214            *v = val;
10215        }
10216        Ok(__struct)
10217    }
10218    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10219        let mut __tmp = BytesMut::new(bytes);
10220        #[allow(clippy::absurd_extreme_comparisons)]
10221        #[allow(unused_comparisons)]
10222        if __tmp.remaining() < Self::ENCODED_LEN {
10223            panic!(
10224                "buffer is too small (need {} bytes, but got {})",
10225                Self::ENCODED_LEN,
10226                __tmp.remaining(),
10227            )
10228        }
10229        __tmp.put_u64_le(self.time_usec);
10230        __tmp.put_u16_le(self.array_id);
10231        for val in &self.name {
10232            __tmp.put_u8(*val);
10233        }
10234        for val in &self.data {
10235            __tmp.put_f32_le(*val);
10236        }
10237        if matches!(version, MavlinkVersion::V2) {
10238            let len = __tmp.len();
10239            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10240        } else {
10241            __tmp.len()
10242        }
10243    }
10244}
10245#[doc = "id: 250"]
10246#[doc = "To debug something using a named 3D vector."]
10247#[derive(Debug, Clone, PartialEq)]
10248#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10249#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10250pub struct DEBUG_VECT_DATA {
10251    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10252    pub time_usec: u64,
10253    #[doc = "x"]
10254    pub x: f32,
10255    #[doc = "y"]
10256    pub y: f32,
10257    #[doc = "z"]
10258    pub z: f32,
10259    #[doc = "Name"]
10260    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10261    pub name: [u8; 10],
10262}
10263impl DEBUG_VECT_DATA {
10264    pub const ENCODED_LEN: usize = 30usize;
10265    pub const DEFAULT: Self = Self {
10266        time_usec: 0_u64,
10267        x: 0.0_f32,
10268        y: 0.0_f32,
10269        z: 0.0_f32,
10270        name: [0_u8; 10usize],
10271    };
10272    #[cfg(feature = "arbitrary")]
10273    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10274        use arbitrary::{Arbitrary, Unstructured};
10275        let mut buf = [0u8; 1024];
10276        rng.fill_bytes(&mut buf);
10277        let mut unstructured = Unstructured::new(&buf);
10278        Self::arbitrary(&mut unstructured).unwrap_or_default()
10279    }
10280}
10281impl Default for DEBUG_VECT_DATA {
10282    fn default() -> Self {
10283        Self::DEFAULT.clone()
10284    }
10285}
10286impl MessageData for DEBUG_VECT_DATA {
10287    type Message = MavMessage;
10288    const ID: u32 = 250u32;
10289    const NAME: &'static str = "DEBUG_VECT";
10290    const EXTRA_CRC: u8 = 49u8;
10291    const ENCODED_LEN: usize = 30usize;
10292    fn deser(
10293        _version: MavlinkVersion,
10294        __input: &[u8],
10295    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10296        let avail_len = __input.len();
10297        let mut payload_buf = [0; Self::ENCODED_LEN];
10298        let mut buf = if avail_len < Self::ENCODED_LEN {
10299            payload_buf[0..avail_len].copy_from_slice(__input);
10300            Bytes::new(&payload_buf)
10301        } else {
10302            Bytes::new(__input)
10303        };
10304        let mut __struct = Self::default();
10305        __struct.time_usec = buf.get_u64_le();
10306        __struct.x = buf.get_f32_le();
10307        __struct.y = buf.get_f32_le();
10308        __struct.z = buf.get_f32_le();
10309        for v in &mut __struct.name {
10310            let val = buf.get_u8();
10311            *v = val;
10312        }
10313        Ok(__struct)
10314    }
10315    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10316        let mut __tmp = BytesMut::new(bytes);
10317        #[allow(clippy::absurd_extreme_comparisons)]
10318        #[allow(unused_comparisons)]
10319        if __tmp.remaining() < Self::ENCODED_LEN {
10320            panic!(
10321                "buffer is too small (need {} bytes, but got {})",
10322                Self::ENCODED_LEN,
10323                __tmp.remaining(),
10324            )
10325        }
10326        __tmp.put_u64_le(self.time_usec);
10327        __tmp.put_f32_le(self.x);
10328        __tmp.put_f32_le(self.y);
10329        __tmp.put_f32_le(self.z);
10330        for val in &self.name {
10331            __tmp.put_u8(*val);
10332        }
10333        if matches!(version, MavlinkVersion::V2) {
10334            let len = __tmp.len();
10335            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10336        } else {
10337            __tmp.len()
10338        }
10339    }
10340}
10341#[doc = "id: 132"]
10342#[doc = "Distance sensor information for an onboard rangefinder."]
10343#[derive(Debug, Clone, PartialEq)]
10344#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10345#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10346pub struct DISTANCE_SENSOR_DATA {
10347    #[doc = "Timestamp (time since system boot)."]
10348    pub time_boot_ms: u32,
10349    #[doc = "Minimum distance the sensor can measure"]
10350    pub min_distance: u16,
10351    #[doc = "Maximum distance the sensor can measure"]
10352    pub max_distance: u16,
10353    #[doc = "Current distance reading"]
10354    pub current_distance: u16,
10355    #[doc = "Type of distance sensor."]
10356    pub mavtype: MavDistanceSensor,
10357    #[doc = "Onboard ID of the sensor"]
10358    pub id: u8,
10359    #[doc = "Direction the sensor faces. downward-facing: ROTATION_PITCH_270, upward-facing: ROTATION_PITCH_90, backward-facing: ROTATION_PITCH_180, forward-facing: ROTATION_NONE, left-facing: ROTATION_YAW_90, right-facing: ROTATION_YAW_270"]
10360    pub orientation: MavSensorOrientation,
10361    #[doc = "Measurement variance. Max standard deviation is 6cm. UINT8_MAX if unknown."]
10362    pub covariance: u8,
10363    #[doc = "Horizontal Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
10364    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10365    pub horizontal_fov: f32,
10366    #[doc = "Vertical Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
10367    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10368    pub vertical_fov: f32,
10369    #[doc = "Quaternion of the sensor orientation in vehicle body frame (w, x, y, z order, zero-rotation is 1, 0, 0, 0). Zero-rotation is along the vehicle body x-axis. This field is required if the orientation is set to MAV_SENSOR_ROTATION_CUSTOM. Set it to 0 if invalid.\""]
10370    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10371    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10372    pub quaternion: [f32; 4],
10373    #[doc = "Signal quality of the sensor. Specific to each sensor type, representing the relation of the signal strength with the target reflectivity, distance, size or aspect, but normalised as a percentage. 0 = unknown/unset signal quality, 1 = invalid signal, 100 = perfect signal."]
10374    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10375    pub signal_quality: u8,
10376}
10377impl DISTANCE_SENSOR_DATA {
10378    pub const ENCODED_LEN: usize = 39usize;
10379    pub const DEFAULT: Self = Self {
10380        time_boot_ms: 0_u32,
10381        min_distance: 0_u16,
10382        max_distance: 0_u16,
10383        current_distance: 0_u16,
10384        mavtype: MavDistanceSensor::DEFAULT,
10385        id: 0_u8,
10386        orientation: MavSensorOrientation::DEFAULT,
10387        covariance: 0_u8,
10388        horizontal_fov: 0.0_f32,
10389        vertical_fov: 0.0_f32,
10390        quaternion: [0.0_f32; 4usize],
10391        signal_quality: 0_u8,
10392    };
10393    #[cfg(feature = "arbitrary")]
10394    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10395        use arbitrary::{Arbitrary, Unstructured};
10396        let mut buf = [0u8; 1024];
10397        rng.fill_bytes(&mut buf);
10398        let mut unstructured = Unstructured::new(&buf);
10399        Self::arbitrary(&mut unstructured).unwrap_or_default()
10400    }
10401}
10402impl Default for DISTANCE_SENSOR_DATA {
10403    fn default() -> Self {
10404        Self::DEFAULT.clone()
10405    }
10406}
10407impl MessageData for DISTANCE_SENSOR_DATA {
10408    type Message = MavMessage;
10409    const ID: u32 = 132u32;
10410    const NAME: &'static str = "DISTANCE_SENSOR";
10411    const EXTRA_CRC: u8 = 85u8;
10412    const ENCODED_LEN: usize = 39usize;
10413    fn deser(
10414        _version: MavlinkVersion,
10415        __input: &[u8],
10416    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10417        let avail_len = __input.len();
10418        let mut payload_buf = [0; Self::ENCODED_LEN];
10419        let mut buf = if avail_len < Self::ENCODED_LEN {
10420            payload_buf[0..avail_len].copy_from_slice(__input);
10421            Bytes::new(&payload_buf)
10422        } else {
10423            Bytes::new(__input)
10424        };
10425        let mut __struct = Self::default();
10426        __struct.time_boot_ms = buf.get_u32_le();
10427        __struct.min_distance = buf.get_u16_le();
10428        __struct.max_distance = buf.get_u16_le();
10429        __struct.current_distance = buf.get_u16_le();
10430        let tmp = buf.get_u8();
10431        __struct.mavtype =
10432            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10433                enum_type: "MavDistanceSensor",
10434                value: tmp as u32,
10435            })?;
10436        __struct.id = buf.get_u8();
10437        let tmp = buf.get_u8();
10438        __struct.orientation =
10439            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10440                enum_type: "MavSensorOrientation",
10441                value: tmp as u32,
10442            })?;
10443        __struct.covariance = buf.get_u8();
10444        __struct.horizontal_fov = buf.get_f32_le();
10445        __struct.vertical_fov = buf.get_f32_le();
10446        for v in &mut __struct.quaternion {
10447            let val = buf.get_f32_le();
10448            *v = val;
10449        }
10450        __struct.signal_quality = buf.get_u8();
10451        Ok(__struct)
10452    }
10453    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10454        let mut __tmp = BytesMut::new(bytes);
10455        #[allow(clippy::absurd_extreme_comparisons)]
10456        #[allow(unused_comparisons)]
10457        if __tmp.remaining() < Self::ENCODED_LEN {
10458            panic!(
10459                "buffer is too small (need {} bytes, but got {})",
10460                Self::ENCODED_LEN,
10461                __tmp.remaining(),
10462            )
10463        }
10464        __tmp.put_u32_le(self.time_boot_ms);
10465        __tmp.put_u16_le(self.min_distance);
10466        __tmp.put_u16_le(self.max_distance);
10467        __tmp.put_u16_le(self.current_distance);
10468        __tmp.put_u8(self.mavtype as u8);
10469        __tmp.put_u8(self.id);
10470        __tmp.put_u8(self.orientation as u8);
10471        __tmp.put_u8(self.covariance);
10472        __tmp.put_f32_le(self.horizontal_fov);
10473        __tmp.put_f32_le(self.vertical_fov);
10474        for val in &self.quaternion {
10475            __tmp.put_f32_le(*val);
10476        }
10477        __tmp.put_u8(self.signal_quality);
10478        if matches!(version, MavlinkVersion::V2) {
10479            let len = __tmp.len();
10480            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10481        } else {
10482            __tmp.len()
10483        }
10484    }
10485}
10486#[doc = "id: 225"]
10487#[doc = "EFI status output."]
10488#[derive(Debug, Clone, PartialEq)]
10489#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10490#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10491pub struct EFI_STATUS_DATA {
10492    #[doc = "ECU index"]
10493    pub ecu_index: f32,
10494    #[doc = "RPM"]
10495    pub rpm: f32,
10496    #[doc = "Fuel consumed"]
10497    pub fuel_consumed: f32,
10498    #[doc = "Fuel flow rate"]
10499    pub fuel_flow: f32,
10500    #[doc = "Engine load"]
10501    pub engine_load: f32,
10502    #[doc = "Throttle position"]
10503    pub throttle_position: f32,
10504    #[doc = "Spark dwell time"]
10505    pub spark_dwell_time: f32,
10506    #[doc = "Barometric pressure"]
10507    pub barometric_pressure: f32,
10508    #[doc = "Intake manifold pressure("]
10509    pub intake_manifold_pressure: f32,
10510    #[doc = "Intake manifold temperature"]
10511    pub intake_manifold_temperature: f32,
10512    #[doc = "Cylinder head temperature"]
10513    pub cylinder_head_temperature: f32,
10514    #[doc = "Ignition timing (Crank angle degrees)"]
10515    pub ignition_timing: f32,
10516    #[doc = "Injection time"]
10517    pub injection_time: f32,
10518    #[doc = "Exhaust gas temperature"]
10519    pub exhaust_gas_temperature: f32,
10520    #[doc = "Output throttle"]
10521    pub throttle_out: f32,
10522    #[doc = "Pressure/temperature compensation"]
10523    pub pt_compensation: f32,
10524    #[doc = "EFI health status"]
10525    pub health: u8,
10526    #[doc = "Supply voltage to EFI sparking system.  Zero in this value means \"unknown\", so if the supply voltage really is zero volts use 0.0001 instead."]
10527    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10528    pub ignition_voltage: f32,
10529    #[doc = "Fuel pressure. Zero in this value means \"unknown\", so if the fuel pressure really is zero kPa use 0.0001 instead."]
10530    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10531    pub fuel_pressure: f32,
10532}
10533impl EFI_STATUS_DATA {
10534    pub const ENCODED_LEN: usize = 73usize;
10535    pub const DEFAULT: Self = Self {
10536        ecu_index: 0.0_f32,
10537        rpm: 0.0_f32,
10538        fuel_consumed: 0.0_f32,
10539        fuel_flow: 0.0_f32,
10540        engine_load: 0.0_f32,
10541        throttle_position: 0.0_f32,
10542        spark_dwell_time: 0.0_f32,
10543        barometric_pressure: 0.0_f32,
10544        intake_manifold_pressure: 0.0_f32,
10545        intake_manifold_temperature: 0.0_f32,
10546        cylinder_head_temperature: 0.0_f32,
10547        ignition_timing: 0.0_f32,
10548        injection_time: 0.0_f32,
10549        exhaust_gas_temperature: 0.0_f32,
10550        throttle_out: 0.0_f32,
10551        pt_compensation: 0.0_f32,
10552        health: 0_u8,
10553        ignition_voltage: 0.0_f32,
10554        fuel_pressure: 0.0_f32,
10555    };
10556    #[cfg(feature = "arbitrary")]
10557    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10558        use arbitrary::{Arbitrary, Unstructured};
10559        let mut buf = [0u8; 1024];
10560        rng.fill_bytes(&mut buf);
10561        let mut unstructured = Unstructured::new(&buf);
10562        Self::arbitrary(&mut unstructured).unwrap_or_default()
10563    }
10564}
10565impl Default for EFI_STATUS_DATA {
10566    fn default() -> Self {
10567        Self::DEFAULT.clone()
10568    }
10569}
10570impl MessageData for EFI_STATUS_DATA {
10571    type Message = MavMessage;
10572    const ID: u32 = 225u32;
10573    const NAME: &'static str = "EFI_STATUS";
10574    const EXTRA_CRC: u8 = 208u8;
10575    const ENCODED_LEN: usize = 73usize;
10576    fn deser(
10577        _version: MavlinkVersion,
10578        __input: &[u8],
10579    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10580        let avail_len = __input.len();
10581        let mut payload_buf = [0; Self::ENCODED_LEN];
10582        let mut buf = if avail_len < Self::ENCODED_LEN {
10583            payload_buf[0..avail_len].copy_from_slice(__input);
10584            Bytes::new(&payload_buf)
10585        } else {
10586            Bytes::new(__input)
10587        };
10588        let mut __struct = Self::default();
10589        __struct.ecu_index = buf.get_f32_le();
10590        __struct.rpm = buf.get_f32_le();
10591        __struct.fuel_consumed = buf.get_f32_le();
10592        __struct.fuel_flow = buf.get_f32_le();
10593        __struct.engine_load = buf.get_f32_le();
10594        __struct.throttle_position = buf.get_f32_le();
10595        __struct.spark_dwell_time = buf.get_f32_le();
10596        __struct.barometric_pressure = buf.get_f32_le();
10597        __struct.intake_manifold_pressure = buf.get_f32_le();
10598        __struct.intake_manifold_temperature = buf.get_f32_le();
10599        __struct.cylinder_head_temperature = buf.get_f32_le();
10600        __struct.ignition_timing = buf.get_f32_le();
10601        __struct.injection_time = buf.get_f32_le();
10602        __struct.exhaust_gas_temperature = buf.get_f32_le();
10603        __struct.throttle_out = buf.get_f32_le();
10604        __struct.pt_compensation = buf.get_f32_le();
10605        __struct.health = buf.get_u8();
10606        __struct.ignition_voltage = buf.get_f32_le();
10607        __struct.fuel_pressure = buf.get_f32_le();
10608        Ok(__struct)
10609    }
10610    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10611        let mut __tmp = BytesMut::new(bytes);
10612        #[allow(clippy::absurd_extreme_comparisons)]
10613        #[allow(unused_comparisons)]
10614        if __tmp.remaining() < Self::ENCODED_LEN {
10615            panic!(
10616                "buffer is too small (need {} bytes, but got {})",
10617                Self::ENCODED_LEN,
10618                __tmp.remaining(),
10619            )
10620        }
10621        __tmp.put_f32_le(self.ecu_index);
10622        __tmp.put_f32_le(self.rpm);
10623        __tmp.put_f32_le(self.fuel_consumed);
10624        __tmp.put_f32_le(self.fuel_flow);
10625        __tmp.put_f32_le(self.engine_load);
10626        __tmp.put_f32_le(self.throttle_position);
10627        __tmp.put_f32_le(self.spark_dwell_time);
10628        __tmp.put_f32_le(self.barometric_pressure);
10629        __tmp.put_f32_le(self.intake_manifold_pressure);
10630        __tmp.put_f32_le(self.intake_manifold_temperature);
10631        __tmp.put_f32_le(self.cylinder_head_temperature);
10632        __tmp.put_f32_le(self.ignition_timing);
10633        __tmp.put_f32_le(self.injection_time);
10634        __tmp.put_f32_le(self.exhaust_gas_temperature);
10635        __tmp.put_f32_le(self.throttle_out);
10636        __tmp.put_f32_le(self.pt_compensation);
10637        __tmp.put_u8(self.health);
10638        __tmp.put_f32_le(self.ignition_voltage);
10639        __tmp.put_f32_le(self.fuel_pressure);
10640        if matches!(version, MavlinkVersion::V2) {
10641            let len = __tmp.len();
10642            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10643        } else {
10644            __tmp.len()
10645        }
10646    }
10647}
10648#[doc = "id: 131"]
10649#[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
10650#[derive(Debug, Clone, PartialEq)]
10651#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10652#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10653pub struct ENCAPSULATED_DATA_DATA {
10654    #[doc = "sequence number (starting with 0 on every transmission)"]
10655    pub seqnr: u16,
10656    #[doc = "image data bytes"]
10657    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10658    pub data: [u8; 253],
10659}
10660impl ENCAPSULATED_DATA_DATA {
10661    pub const ENCODED_LEN: usize = 255usize;
10662    pub const DEFAULT: Self = Self {
10663        seqnr: 0_u16,
10664        data: [0_u8; 253usize],
10665    };
10666    #[cfg(feature = "arbitrary")]
10667    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10668        use arbitrary::{Arbitrary, Unstructured};
10669        let mut buf = [0u8; 1024];
10670        rng.fill_bytes(&mut buf);
10671        let mut unstructured = Unstructured::new(&buf);
10672        Self::arbitrary(&mut unstructured).unwrap_or_default()
10673    }
10674}
10675impl Default for ENCAPSULATED_DATA_DATA {
10676    fn default() -> Self {
10677        Self::DEFAULT.clone()
10678    }
10679}
10680impl MessageData for ENCAPSULATED_DATA_DATA {
10681    type Message = MavMessage;
10682    const ID: u32 = 131u32;
10683    const NAME: &'static str = "ENCAPSULATED_DATA";
10684    const EXTRA_CRC: u8 = 223u8;
10685    const ENCODED_LEN: usize = 255usize;
10686    fn deser(
10687        _version: MavlinkVersion,
10688        __input: &[u8],
10689    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10690        let avail_len = __input.len();
10691        let mut payload_buf = [0; Self::ENCODED_LEN];
10692        let mut buf = if avail_len < Self::ENCODED_LEN {
10693            payload_buf[0..avail_len].copy_from_slice(__input);
10694            Bytes::new(&payload_buf)
10695        } else {
10696            Bytes::new(__input)
10697        };
10698        let mut __struct = Self::default();
10699        __struct.seqnr = buf.get_u16_le();
10700        for v in &mut __struct.data {
10701            let val = buf.get_u8();
10702            *v = val;
10703        }
10704        Ok(__struct)
10705    }
10706    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10707        let mut __tmp = BytesMut::new(bytes);
10708        #[allow(clippy::absurd_extreme_comparisons)]
10709        #[allow(unused_comparisons)]
10710        if __tmp.remaining() < Self::ENCODED_LEN {
10711            panic!(
10712                "buffer is too small (need {} bytes, but got {})",
10713                Self::ENCODED_LEN,
10714                __tmp.remaining(),
10715            )
10716        }
10717        __tmp.put_u16_le(self.seqnr);
10718        for val in &self.data {
10719            __tmp.put_u8(*val);
10720        }
10721        if matches!(version, MavlinkVersion::V2) {
10722            let len = __tmp.len();
10723            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10724        } else {
10725            __tmp.len()
10726        }
10727    }
10728}
10729#[doc = "id: 290"]
10730#[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
10731#[derive(Debug, Clone, PartialEq)]
10732#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10733#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10734pub struct ESC_INFO_DATA {
10735    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
10736    pub time_usec: u64,
10737    #[doc = "Number of reported errors by each ESC since boot."]
10738    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10739    pub error_count: [u32; 4],
10740    #[doc = "Counter of data packets received."]
10741    pub counter: u16,
10742    #[doc = "Bitmap of ESC failure flags."]
10743    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10744    pub failure_flags: [u16; 4],
10745    #[doc = "Temperature of each ESC. INT16_MAX: if data not supplied by ESC."]
10746    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10747    pub temperature: [i16; 4],
10748    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
10749    pub index: u8,
10750    #[doc = "Total number of ESCs in all messages of this type. Message fields with an index higher than this should be ignored because they contain invalid data."]
10751    pub count: u8,
10752    #[doc = "Connection type protocol for all ESC."]
10753    pub connection_type: EscConnectionType,
10754    #[doc = "Information regarding online/offline status of each ESC."]
10755    pub info: u8,
10756}
10757impl ESC_INFO_DATA {
10758    pub const ENCODED_LEN: usize = 46usize;
10759    pub const DEFAULT: Self = Self {
10760        time_usec: 0_u64,
10761        error_count: [0_u32; 4usize],
10762        counter: 0_u16,
10763        failure_flags: [0_u16; 4usize],
10764        temperature: [0_i16; 4usize],
10765        index: 0_u8,
10766        count: 0_u8,
10767        connection_type: EscConnectionType::DEFAULT,
10768        info: 0_u8,
10769    };
10770    #[cfg(feature = "arbitrary")]
10771    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10772        use arbitrary::{Arbitrary, Unstructured};
10773        let mut buf = [0u8; 1024];
10774        rng.fill_bytes(&mut buf);
10775        let mut unstructured = Unstructured::new(&buf);
10776        Self::arbitrary(&mut unstructured).unwrap_or_default()
10777    }
10778}
10779impl Default for ESC_INFO_DATA {
10780    fn default() -> Self {
10781        Self::DEFAULT.clone()
10782    }
10783}
10784impl MessageData for ESC_INFO_DATA {
10785    type Message = MavMessage;
10786    const ID: u32 = 290u32;
10787    const NAME: &'static str = "ESC_INFO";
10788    const EXTRA_CRC: u8 = 251u8;
10789    const ENCODED_LEN: usize = 46usize;
10790    fn deser(
10791        _version: MavlinkVersion,
10792        __input: &[u8],
10793    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10794        let avail_len = __input.len();
10795        let mut payload_buf = [0; Self::ENCODED_LEN];
10796        let mut buf = if avail_len < Self::ENCODED_LEN {
10797            payload_buf[0..avail_len].copy_from_slice(__input);
10798            Bytes::new(&payload_buf)
10799        } else {
10800            Bytes::new(__input)
10801        };
10802        let mut __struct = Self::default();
10803        __struct.time_usec = buf.get_u64_le();
10804        for v in &mut __struct.error_count {
10805            let val = buf.get_u32_le();
10806            *v = val;
10807        }
10808        __struct.counter = buf.get_u16_le();
10809        for v in &mut __struct.failure_flags {
10810            let val = buf.get_u16_le();
10811            *v = val;
10812        }
10813        for v in &mut __struct.temperature {
10814            let val = buf.get_i16_le();
10815            *v = val;
10816        }
10817        __struct.index = buf.get_u8();
10818        __struct.count = buf.get_u8();
10819        let tmp = buf.get_u8();
10820        __struct.connection_type =
10821            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10822                enum_type: "EscConnectionType",
10823                value: tmp as u32,
10824            })?;
10825        __struct.info = buf.get_u8();
10826        Ok(__struct)
10827    }
10828    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10829        let mut __tmp = BytesMut::new(bytes);
10830        #[allow(clippy::absurd_extreme_comparisons)]
10831        #[allow(unused_comparisons)]
10832        if __tmp.remaining() < Self::ENCODED_LEN {
10833            panic!(
10834                "buffer is too small (need {} bytes, but got {})",
10835                Self::ENCODED_LEN,
10836                __tmp.remaining(),
10837            )
10838        }
10839        __tmp.put_u64_le(self.time_usec);
10840        for val in &self.error_count {
10841            __tmp.put_u32_le(*val);
10842        }
10843        __tmp.put_u16_le(self.counter);
10844        for val in &self.failure_flags {
10845            __tmp.put_u16_le(*val);
10846        }
10847        for val in &self.temperature {
10848            __tmp.put_i16_le(*val);
10849        }
10850        __tmp.put_u8(self.index);
10851        __tmp.put_u8(self.count);
10852        __tmp.put_u8(self.connection_type as u8);
10853        __tmp.put_u8(self.info);
10854        if matches!(version, MavlinkVersion::V2) {
10855            let len = __tmp.len();
10856            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10857        } else {
10858            __tmp.len()
10859        }
10860    }
10861}
10862#[doc = "id: 291"]
10863#[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
10864#[derive(Debug, Clone, PartialEq)]
10865#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10866#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10867pub struct ESC_STATUS_DATA {
10868    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
10869    pub time_usec: u64,
10870    #[doc = "Reported motor RPM from each ESC (negative for reverse rotation)."]
10871    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10872    pub rpm: [i32; 4],
10873    #[doc = "Voltage measured from each ESC."]
10874    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10875    pub voltage: [f32; 4],
10876    #[doc = "Current measured from each ESC."]
10877    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10878    pub current: [f32; 4],
10879    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
10880    pub index: u8,
10881}
10882impl ESC_STATUS_DATA {
10883    pub const ENCODED_LEN: usize = 57usize;
10884    pub const DEFAULT: Self = Self {
10885        time_usec: 0_u64,
10886        rpm: [0_i32; 4usize],
10887        voltage: [0.0_f32; 4usize],
10888        current: [0.0_f32; 4usize],
10889        index: 0_u8,
10890    };
10891    #[cfg(feature = "arbitrary")]
10892    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10893        use arbitrary::{Arbitrary, Unstructured};
10894        let mut buf = [0u8; 1024];
10895        rng.fill_bytes(&mut buf);
10896        let mut unstructured = Unstructured::new(&buf);
10897        Self::arbitrary(&mut unstructured).unwrap_or_default()
10898    }
10899}
10900impl Default for ESC_STATUS_DATA {
10901    fn default() -> Self {
10902        Self::DEFAULT.clone()
10903    }
10904}
10905impl MessageData for ESC_STATUS_DATA {
10906    type Message = MavMessage;
10907    const ID: u32 = 291u32;
10908    const NAME: &'static str = "ESC_STATUS";
10909    const EXTRA_CRC: u8 = 10u8;
10910    const ENCODED_LEN: usize = 57usize;
10911    fn deser(
10912        _version: MavlinkVersion,
10913        __input: &[u8],
10914    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10915        let avail_len = __input.len();
10916        let mut payload_buf = [0; Self::ENCODED_LEN];
10917        let mut buf = if avail_len < Self::ENCODED_LEN {
10918            payload_buf[0..avail_len].copy_from_slice(__input);
10919            Bytes::new(&payload_buf)
10920        } else {
10921            Bytes::new(__input)
10922        };
10923        let mut __struct = Self::default();
10924        __struct.time_usec = buf.get_u64_le();
10925        for v in &mut __struct.rpm {
10926            let val = buf.get_i32_le();
10927            *v = val;
10928        }
10929        for v in &mut __struct.voltage {
10930            let val = buf.get_f32_le();
10931            *v = val;
10932        }
10933        for v in &mut __struct.current {
10934            let val = buf.get_f32_le();
10935            *v = val;
10936        }
10937        __struct.index = buf.get_u8();
10938        Ok(__struct)
10939    }
10940    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10941        let mut __tmp = BytesMut::new(bytes);
10942        #[allow(clippy::absurd_extreme_comparisons)]
10943        #[allow(unused_comparisons)]
10944        if __tmp.remaining() < Self::ENCODED_LEN {
10945            panic!(
10946                "buffer is too small (need {} bytes, but got {})",
10947                Self::ENCODED_LEN,
10948                __tmp.remaining(),
10949            )
10950        }
10951        __tmp.put_u64_le(self.time_usec);
10952        for val in &self.rpm {
10953            __tmp.put_i32_le(*val);
10954        }
10955        for val in &self.voltage {
10956            __tmp.put_f32_le(*val);
10957        }
10958        for val in &self.current {
10959            __tmp.put_f32_le(*val);
10960        }
10961        __tmp.put_u8(self.index);
10962        if matches!(version, MavlinkVersion::V2) {
10963            let len = __tmp.len();
10964            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10965        } else {
10966            __tmp.len()
10967        }
10968    }
10969}
10970#[doc = "id: 230"]
10971#[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
10972#[derive(Debug, Clone, PartialEq)]
10973#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10974#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10975pub struct ESTIMATOR_STATUS_DATA {
10976    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10977    pub time_usec: u64,
10978    #[doc = "Velocity innovation test ratio"]
10979    pub vel_ratio: f32,
10980    #[doc = "Horizontal position innovation test ratio"]
10981    pub pos_horiz_ratio: f32,
10982    #[doc = "Vertical position innovation test ratio"]
10983    pub pos_vert_ratio: f32,
10984    #[doc = "Magnetometer innovation test ratio"]
10985    pub mag_ratio: f32,
10986    #[doc = "Height above terrain innovation test ratio"]
10987    pub hagl_ratio: f32,
10988    #[doc = "True airspeed innovation test ratio"]
10989    pub tas_ratio: f32,
10990    #[doc = "Horizontal position 1-STD accuracy relative to the EKF local origin"]
10991    pub pos_horiz_accuracy: f32,
10992    #[doc = "Vertical position 1-STD accuracy relative to the EKF local origin"]
10993    pub pos_vert_accuracy: f32,
10994    #[doc = "Bitmap indicating which EKF outputs are valid."]
10995    pub flags: EstimatorStatusFlags,
10996}
10997impl ESTIMATOR_STATUS_DATA {
10998    pub const ENCODED_LEN: usize = 42usize;
10999    pub const DEFAULT: Self = Self {
11000        time_usec: 0_u64,
11001        vel_ratio: 0.0_f32,
11002        pos_horiz_ratio: 0.0_f32,
11003        pos_vert_ratio: 0.0_f32,
11004        mag_ratio: 0.0_f32,
11005        hagl_ratio: 0.0_f32,
11006        tas_ratio: 0.0_f32,
11007        pos_horiz_accuracy: 0.0_f32,
11008        pos_vert_accuracy: 0.0_f32,
11009        flags: EstimatorStatusFlags::DEFAULT,
11010    };
11011    #[cfg(feature = "arbitrary")]
11012    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11013        use arbitrary::{Arbitrary, Unstructured};
11014        let mut buf = [0u8; 1024];
11015        rng.fill_bytes(&mut buf);
11016        let mut unstructured = Unstructured::new(&buf);
11017        Self::arbitrary(&mut unstructured).unwrap_or_default()
11018    }
11019}
11020impl Default for ESTIMATOR_STATUS_DATA {
11021    fn default() -> Self {
11022        Self::DEFAULT.clone()
11023    }
11024}
11025impl MessageData for ESTIMATOR_STATUS_DATA {
11026    type Message = MavMessage;
11027    const ID: u32 = 230u32;
11028    const NAME: &'static str = "ESTIMATOR_STATUS";
11029    const EXTRA_CRC: u8 = 163u8;
11030    const ENCODED_LEN: usize = 42usize;
11031    fn deser(
11032        _version: MavlinkVersion,
11033        __input: &[u8],
11034    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11035        let avail_len = __input.len();
11036        let mut payload_buf = [0; Self::ENCODED_LEN];
11037        let mut buf = if avail_len < Self::ENCODED_LEN {
11038            payload_buf[0..avail_len].copy_from_slice(__input);
11039            Bytes::new(&payload_buf)
11040        } else {
11041            Bytes::new(__input)
11042        };
11043        let mut __struct = Self::default();
11044        __struct.time_usec = buf.get_u64_le();
11045        __struct.vel_ratio = buf.get_f32_le();
11046        __struct.pos_horiz_ratio = buf.get_f32_le();
11047        __struct.pos_vert_ratio = buf.get_f32_le();
11048        __struct.mag_ratio = buf.get_f32_le();
11049        __struct.hagl_ratio = buf.get_f32_le();
11050        __struct.tas_ratio = buf.get_f32_le();
11051        __struct.pos_horiz_accuracy = buf.get_f32_le();
11052        __struct.pos_vert_accuracy = buf.get_f32_le();
11053        let tmp = buf.get_u16_le();
11054        __struct.flags = EstimatorStatusFlags::from_bits(tmp & EstimatorStatusFlags::all().bits())
11055            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
11056                flag_type: "EstimatorStatusFlags",
11057                value: tmp as u32,
11058            })?;
11059        Ok(__struct)
11060    }
11061    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11062        let mut __tmp = BytesMut::new(bytes);
11063        #[allow(clippy::absurd_extreme_comparisons)]
11064        #[allow(unused_comparisons)]
11065        if __tmp.remaining() < Self::ENCODED_LEN {
11066            panic!(
11067                "buffer is too small (need {} bytes, but got {})",
11068                Self::ENCODED_LEN,
11069                __tmp.remaining(),
11070            )
11071        }
11072        __tmp.put_u64_le(self.time_usec);
11073        __tmp.put_f32_le(self.vel_ratio);
11074        __tmp.put_f32_le(self.pos_horiz_ratio);
11075        __tmp.put_f32_le(self.pos_vert_ratio);
11076        __tmp.put_f32_le(self.mag_ratio);
11077        __tmp.put_f32_le(self.hagl_ratio);
11078        __tmp.put_f32_le(self.tas_ratio);
11079        __tmp.put_f32_le(self.pos_horiz_accuracy);
11080        __tmp.put_f32_le(self.pos_vert_accuracy);
11081        __tmp.put_u16_le(self.flags.bits());
11082        if matches!(version, MavlinkVersion::V2) {
11083            let len = __tmp.len();
11084            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11085        } else {
11086            __tmp.len()
11087        }
11088    }
11089}
11090#[doc = "id: 410"]
11091#[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
11092#[derive(Debug, Clone, PartialEq)]
11093#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11094#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11095pub struct EVENT_DATA {
11096    #[doc = "Event ID (as defined in the component metadata)"]
11097    pub id: u32,
11098    #[doc = "Timestamp (time since system boot when the event happened)."]
11099    pub event_time_boot_ms: u32,
11100    #[doc = "Sequence number."]
11101    pub sequence: u16,
11102    #[doc = "Component ID"]
11103    pub destination_component: u8,
11104    #[doc = "System ID"]
11105    pub destination_system: u8,
11106    #[doc = "Log levels: 4 bits MSB: internal (for logging purposes), 4 bits LSB: external. Levels: Emergency = 0, Alert = 1, Critical = 2, Error = 3, Warning = 4, Notice = 5, Info = 6, Debug = 7, Protocol = 8, Disabled = 9"]
11107    pub log_levels: u8,
11108    #[doc = "Arguments (depend on event ID)."]
11109    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11110    pub arguments: [u8; 40],
11111}
11112impl EVENT_DATA {
11113    pub const ENCODED_LEN: usize = 53usize;
11114    pub const DEFAULT: Self = Self {
11115        id: 0_u32,
11116        event_time_boot_ms: 0_u32,
11117        sequence: 0_u16,
11118        destination_component: 0_u8,
11119        destination_system: 0_u8,
11120        log_levels: 0_u8,
11121        arguments: [0_u8; 40usize],
11122    };
11123    #[cfg(feature = "arbitrary")]
11124    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11125        use arbitrary::{Arbitrary, Unstructured};
11126        let mut buf = [0u8; 1024];
11127        rng.fill_bytes(&mut buf);
11128        let mut unstructured = Unstructured::new(&buf);
11129        Self::arbitrary(&mut unstructured).unwrap_or_default()
11130    }
11131}
11132impl Default for EVENT_DATA {
11133    fn default() -> Self {
11134        Self::DEFAULT.clone()
11135    }
11136}
11137impl MessageData for EVENT_DATA {
11138    type Message = MavMessage;
11139    const ID: u32 = 410u32;
11140    const NAME: &'static str = "EVENT";
11141    const EXTRA_CRC: u8 = 160u8;
11142    const ENCODED_LEN: usize = 53usize;
11143    fn deser(
11144        _version: MavlinkVersion,
11145        __input: &[u8],
11146    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11147        let avail_len = __input.len();
11148        let mut payload_buf = [0; Self::ENCODED_LEN];
11149        let mut buf = if avail_len < Self::ENCODED_LEN {
11150            payload_buf[0..avail_len].copy_from_slice(__input);
11151            Bytes::new(&payload_buf)
11152        } else {
11153            Bytes::new(__input)
11154        };
11155        let mut __struct = Self::default();
11156        __struct.id = buf.get_u32_le();
11157        __struct.event_time_boot_ms = buf.get_u32_le();
11158        __struct.sequence = buf.get_u16_le();
11159        __struct.destination_component = buf.get_u8();
11160        __struct.destination_system = buf.get_u8();
11161        __struct.log_levels = buf.get_u8();
11162        for v in &mut __struct.arguments {
11163            let val = buf.get_u8();
11164            *v = val;
11165        }
11166        Ok(__struct)
11167    }
11168    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11169        let mut __tmp = BytesMut::new(bytes);
11170        #[allow(clippy::absurd_extreme_comparisons)]
11171        #[allow(unused_comparisons)]
11172        if __tmp.remaining() < Self::ENCODED_LEN {
11173            panic!(
11174                "buffer is too small (need {} bytes, but got {})",
11175                Self::ENCODED_LEN,
11176                __tmp.remaining(),
11177            )
11178        }
11179        __tmp.put_u32_le(self.id);
11180        __tmp.put_u32_le(self.event_time_boot_ms);
11181        __tmp.put_u16_le(self.sequence);
11182        __tmp.put_u8(self.destination_component);
11183        __tmp.put_u8(self.destination_system);
11184        __tmp.put_u8(self.log_levels);
11185        for val in &self.arguments {
11186            __tmp.put_u8(*val);
11187        }
11188        if matches!(version, MavlinkVersion::V2) {
11189            let len = __tmp.len();
11190            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11191        } else {
11192            __tmp.len()
11193        }
11194    }
11195}
11196#[doc = "id: 245"]
11197#[doc = "Provides state for additional features."]
11198#[derive(Debug, Clone, PartialEq)]
11199#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11200#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11201pub struct EXTENDED_SYS_STATE_DATA {
11202    #[doc = "The VTOL state if applicable. Is set to MAV_VTOL_STATE_UNDEFINED if UAV is not in VTOL configuration."]
11203    pub vtol_state: MavVtolState,
11204    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
11205    pub landed_state: MavLandedState,
11206}
11207impl EXTENDED_SYS_STATE_DATA {
11208    pub const ENCODED_LEN: usize = 2usize;
11209    pub const DEFAULT: Self = Self {
11210        vtol_state: MavVtolState::DEFAULT,
11211        landed_state: MavLandedState::DEFAULT,
11212    };
11213    #[cfg(feature = "arbitrary")]
11214    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11215        use arbitrary::{Arbitrary, Unstructured};
11216        let mut buf = [0u8; 1024];
11217        rng.fill_bytes(&mut buf);
11218        let mut unstructured = Unstructured::new(&buf);
11219        Self::arbitrary(&mut unstructured).unwrap_or_default()
11220    }
11221}
11222impl Default for EXTENDED_SYS_STATE_DATA {
11223    fn default() -> Self {
11224        Self::DEFAULT.clone()
11225    }
11226}
11227impl MessageData for EXTENDED_SYS_STATE_DATA {
11228    type Message = MavMessage;
11229    const ID: u32 = 245u32;
11230    const NAME: &'static str = "EXTENDED_SYS_STATE";
11231    const EXTRA_CRC: u8 = 130u8;
11232    const ENCODED_LEN: usize = 2usize;
11233    fn deser(
11234        _version: MavlinkVersion,
11235        __input: &[u8],
11236    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11237        let avail_len = __input.len();
11238        let mut payload_buf = [0; Self::ENCODED_LEN];
11239        let mut buf = if avail_len < Self::ENCODED_LEN {
11240            payload_buf[0..avail_len].copy_from_slice(__input);
11241            Bytes::new(&payload_buf)
11242        } else {
11243            Bytes::new(__input)
11244        };
11245        let mut __struct = Self::default();
11246        let tmp = buf.get_u8();
11247        __struct.vtol_state =
11248            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11249                enum_type: "MavVtolState",
11250                value: tmp as u32,
11251            })?;
11252        let tmp = buf.get_u8();
11253        __struct.landed_state =
11254            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11255                enum_type: "MavLandedState",
11256                value: tmp as u32,
11257            })?;
11258        Ok(__struct)
11259    }
11260    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11261        let mut __tmp = BytesMut::new(bytes);
11262        #[allow(clippy::absurd_extreme_comparisons)]
11263        #[allow(unused_comparisons)]
11264        if __tmp.remaining() < Self::ENCODED_LEN {
11265            panic!(
11266                "buffer is too small (need {} bytes, but got {})",
11267                Self::ENCODED_LEN,
11268                __tmp.remaining(),
11269            )
11270        }
11271        __tmp.put_u8(self.vtol_state as u8);
11272        __tmp.put_u8(self.landed_state as u8);
11273        if matches!(version, MavlinkVersion::V2) {
11274            let len = __tmp.len();
11275            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11276        } else {
11277            __tmp.len()
11278        }
11279    }
11280}
11281#[doc = "id: 162"]
11282#[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
11283#[derive(Debug, Clone, PartialEq)]
11284#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11285#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11286pub struct FENCE_STATUS_DATA {
11287    #[doc = "Time (since boot) of last breach."]
11288    pub breach_time: u32,
11289    #[doc = "Number of fence breaches."]
11290    pub breach_count: u16,
11291    #[doc = "Breach status (0 if currently inside fence, 1 if outside)."]
11292    pub breach_status: u8,
11293    #[doc = "Last breach type."]
11294    pub breach_type: FenceBreach,
11295    #[doc = "Active action to prevent fence breach"]
11296    #[cfg_attr(feature = "serde", serde(default))]
11297    pub breach_mitigation: FenceMitigate,
11298}
11299impl FENCE_STATUS_DATA {
11300    pub const ENCODED_LEN: usize = 9usize;
11301    pub const DEFAULT: Self = Self {
11302        breach_time: 0_u32,
11303        breach_count: 0_u16,
11304        breach_status: 0_u8,
11305        breach_type: FenceBreach::DEFAULT,
11306        breach_mitigation: FenceMitigate::DEFAULT,
11307    };
11308    #[cfg(feature = "arbitrary")]
11309    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11310        use arbitrary::{Arbitrary, Unstructured};
11311        let mut buf = [0u8; 1024];
11312        rng.fill_bytes(&mut buf);
11313        let mut unstructured = Unstructured::new(&buf);
11314        Self::arbitrary(&mut unstructured).unwrap_or_default()
11315    }
11316}
11317impl Default for FENCE_STATUS_DATA {
11318    fn default() -> Self {
11319        Self::DEFAULT.clone()
11320    }
11321}
11322impl MessageData for FENCE_STATUS_DATA {
11323    type Message = MavMessage;
11324    const ID: u32 = 162u32;
11325    const NAME: &'static str = "FENCE_STATUS";
11326    const EXTRA_CRC: u8 = 189u8;
11327    const ENCODED_LEN: usize = 9usize;
11328    fn deser(
11329        _version: MavlinkVersion,
11330        __input: &[u8],
11331    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11332        let avail_len = __input.len();
11333        let mut payload_buf = [0; Self::ENCODED_LEN];
11334        let mut buf = if avail_len < Self::ENCODED_LEN {
11335            payload_buf[0..avail_len].copy_from_slice(__input);
11336            Bytes::new(&payload_buf)
11337        } else {
11338            Bytes::new(__input)
11339        };
11340        let mut __struct = Self::default();
11341        __struct.breach_time = buf.get_u32_le();
11342        __struct.breach_count = buf.get_u16_le();
11343        __struct.breach_status = buf.get_u8();
11344        let tmp = buf.get_u8();
11345        __struct.breach_type =
11346            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11347                enum_type: "FenceBreach",
11348                value: tmp as u32,
11349            })?;
11350        let tmp = buf.get_u8();
11351        __struct.breach_mitigation =
11352            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11353                enum_type: "FenceMitigate",
11354                value: tmp as u32,
11355            })?;
11356        Ok(__struct)
11357    }
11358    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11359        let mut __tmp = BytesMut::new(bytes);
11360        #[allow(clippy::absurd_extreme_comparisons)]
11361        #[allow(unused_comparisons)]
11362        if __tmp.remaining() < Self::ENCODED_LEN {
11363            panic!(
11364                "buffer is too small (need {} bytes, but got {})",
11365                Self::ENCODED_LEN,
11366                __tmp.remaining(),
11367            )
11368        }
11369        __tmp.put_u32_le(self.breach_time);
11370        __tmp.put_u16_le(self.breach_count);
11371        __tmp.put_u8(self.breach_status);
11372        __tmp.put_u8(self.breach_type as u8);
11373        __tmp.put_u8(self.breach_mitigation as u8);
11374        if matches!(version, MavlinkVersion::V2) {
11375            let len = __tmp.len();
11376            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11377        } else {
11378            __tmp.len()
11379        }
11380    }
11381}
11382#[doc = "id: 110"]
11383#[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
11384#[derive(Debug, Clone, PartialEq)]
11385#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11386#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11387pub struct FILE_TRANSFER_PROTOCOL_DATA {
11388    #[doc = "Network ID (0 for broadcast)"]
11389    pub target_network: u8,
11390    #[doc = "System ID (0 for broadcast)"]
11391    pub target_system: u8,
11392    #[doc = "Component ID (0 for broadcast)"]
11393    pub target_component: u8,
11394    #[doc = "Variable length payload. The length is defined by the remaining message length when subtracting the header and other fields. The content/format of this block is defined in <https://mavlink.io/en/services/ftp.html>."]
11395    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11396    pub payload: [u8; 251],
11397}
11398impl FILE_TRANSFER_PROTOCOL_DATA {
11399    pub const ENCODED_LEN: usize = 254usize;
11400    pub const DEFAULT: Self = Self {
11401        target_network: 0_u8,
11402        target_system: 0_u8,
11403        target_component: 0_u8,
11404        payload: [0_u8; 251usize],
11405    };
11406    #[cfg(feature = "arbitrary")]
11407    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11408        use arbitrary::{Arbitrary, Unstructured};
11409        let mut buf = [0u8; 1024];
11410        rng.fill_bytes(&mut buf);
11411        let mut unstructured = Unstructured::new(&buf);
11412        Self::arbitrary(&mut unstructured).unwrap_or_default()
11413    }
11414}
11415impl Default for FILE_TRANSFER_PROTOCOL_DATA {
11416    fn default() -> Self {
11417        Self::DEFAULT.clone()
11418    }
11419}
11420impl MessageData for FILE_TRANSFER_PROTOCOL_DATA {
11421    type Message = MavMessage;
11422    const ID: u32 = 110u32;
11423    const NAME: &'static str = "FILE_TRANSFER_PROTOCOL";
11424    const EXTRA_CRC: u8 = 84u8;
11425    const ENCODED_LEN: usize = 254usize;
11426    fn deser(
11427        _version: MavlinkVersion,
11428        __input: &[u8],
11429    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11430        let avail_len = __input.len();
11431        let mut payload_buf = [0; Self::ENCODED_LEN];
11432        let mut buf = if avail_len < Self::ENCODED_LEN {
11433            payload_buf[0..avail_len].copy_from_slice(__input);
11434            Bytes::new(&payload_buf)
11435        } else {
11436            Bytes::new(__input)
11437        };
11438        let mut __struct = Self::default();
11439        __struct.target_network = buf.get_u8();
11440        __struct.target_system = buf.get_u8();
11441        __struct.target_component = buf.get_u8();
11442        for v in &mut __struct.payload {
11443            let val = buf.get_u8();
11444            *v = val;
11445        }
11446        Ok(__struct)
11447    }
11448    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11449        let mut __tmp = BytesMut::new(bytes);
11450        #[allow(clippy::absurd_extreme_comparisons)]
11451        #[allow(unused_comparisons)]
11452        if __tmp.remaining() < Self::ENCODED_LEN {
11453            panic!(
11454                "buffer is too small (need {} bytes, but got {})",
11455                Self::ENCODED_LEN,
11456                __tmp.remaining(),
11457            )
11458        }
11459        __tmp.put_u8(self.target_network);
11460        __tmp.put_u8(self.target_system);
11461        __tmp.put_u8(self.target_component);
11462        for val in &self.payload {
11463            __tmp.put_u8(*val);
11464        }
11465        if matches!(version, MavlinkVersion::V2) {
11466            let len = __tmp.len();
11467            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11468        } else {
11469            __tmp.len()
11470        }
11471    }
11472}
11473#[doc = "id: 264"]
11474#[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
11475#[derive(Debug, Clone, PartialEq)]
11476#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11477#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11478pub struct FLIGHT_INFORMATION_DATA {
11479    #[doc = "Timestamp at arming (since system boot). Set to 0 on boot. Set value on arming. Note, field is misnamed UTC."]
11480    pub arming_time_utc: u64,
11481    #[doc = "Timestamp at takeoff (since system boot). Set to 0 at boot and on arming. Note, field is misnamed UTC."]
11482    pub takeoff_time_utc: u64,
11483    #[doc = "Flight number. Note, field is misnamed UUID."]
11484    pub flight_uuid: u64,
11485    #[doc = "Timestamp (time since system boot)."]
11486    pub time_boot_ms: u32,
11487    #[doc = "Timestamp at landing (in ms since system boot). Set to 0 at boot and on arming."]
11488    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11489    pub landing_time: u32,
11490}
11491impl FLIGHT_INFORMATION_DATA {
11492    pub const ENCODED_LEN: usize = 32usize;
11493    pub const DEFAULT: Self = Self {
11494        arming_time_utc: 0_u64,
11495        takeoff_time_utc: 0_u64,
11496        flight_uuid: 0_u64,
11497        time_boot_ms: 0_u32,
11498        landing_time: 0_u32,
11499    };
11500    #[cfg(feature = "arbitrary")]
11501    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11502        use arbitrary::{Arbitrary, Unstructured};
11503        let mut buf = [0u8; 1024];
11504        rng.fill_bytes(&mut buf);
11505        let mut unstructured = Unstructured::new(&buf);
11506        Self::arbitrary(&mut unstructured).unwrap_or_default()
11507    }
11508}
11509impl Default for FLIGHT_INFORMATION_DATA {
11510    fn default() -> Self {
11511        Self::DEFAULT.clone()
11512    }
11513}
11514impl MessageData for FLIGHT_INFORMATION_DATA {
11515    type Message = MavMessage;
11516    const ID: u32 = 264u32;
11517    const NAME: &'static str = "FLIGHT_INFORMATION";
11518    const EXTRA_CRC: u8 = 49u8;
11519    const ENCODED_LEN: usize = 32usize;
11520    fn deser(
11521        _version: MavlinkVersion,
11522        __input: &[u8],
11523    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11524        let avail_len = __input.len();
11525        let mut payload_buf = [0; Self::ENCODED_LEN];
11526        let mut buf = if avail_len < Self::ENCODED_LEN {
11527            payload_buf[0..avail_len].copy_from_slice(__input);
11528            Bytes::new(&payload_buf)
11529        } else {
11530            Bytes::new(__input)
11531        };
11532        let mut __struct = Self::default();
11533        __struct.arming_time_utc = buf.get_u64_le();
11534        __struct.takeoff_time_utc = buf.get_u64_le();
11535        __struct.flight_uuid = buf.get_u64_le();
11536        __struct.time_boot_ms = buf.get_u32_le();
11537        __struct.landing_time = buf.get_u32_le();
11538        Ok(__struct)
11539    }
11540    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11541        let mut __tmp = BytesMut::new(bytes);
11542        #[allow(clippy::absurd_extreme_comparisons)]
11543        #[allow(unused_comparisons)]
11544        if __tmp.remaining() < Self::ENCODED_LEN {
11545            panic!(
11546                "buffer is too small (need {} bytes, but got {})",
11547                Self::ENCODED_LEN,
11548                __tmp.remaining(),
11549            )
11550        }
11551        __tmp.put_u64_le(self.arming_time_utc);
11552        __tmp.put_u64_le(self.takeoff_time_utc);
11553        __tmp.put_u64_le(self.flight_uuid);
11554        __tmp.put_u32_le(self.time_boot_ms);
11555        __tmp.put_u32_le(self.landing_time);
11556        if matches!(version, MavlinkVersion::V2) {
11557            let len = __tmp.len();
11558            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11559        } else {
11560            __tmp.len()
11561        }
11562    }
11563}
11564#[doc = "id: 144"]
11565#[doc = "Current motion information from a designated system."]
11566#[derive(Debug, Clone, PartialEq)]
11567#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11568#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11569pub struct FOLLOW_TARGET_DATA {
11570    #[doc = "Timestamp (time since system boot)."]
11571    pub timestamp: u64,
11572    #[doc = "button states or switches of a tracker device"]
11573    pub custom_state: u64,
11574    #[doc = "Latitude (WGS84)"]
11575    pub lat: i32,
11576    #[doc = "Longitude (WGS84)"]
11577    pub lon: i32,
11578    #[doc = "Altitude (MSL)"]
11579    pub alt: f32,
11580    #[doc = "target velocity (0,0,0) for unknown"]
11581    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11582    pub vel: [f32; 3],
11583    #[doc = "linear target acceleration (0,0,0) for unknown"]
11584    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11585    pub acc: [f32; 3],
11586    #[doc = "(0 0 0 0 for unknown)"]
11587    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11588    pub attitude_q: [f32; 4],
11589    #[doc = "(0 0 0 for unknown)"]
11590    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11591    pub rates: [f32; 3],
11592    #[doc = "eph epv"]
11593    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11594    pub position_cov: [f32; 3],
11595    #[doc = "bit positions for tracker reporting capabilities (POS = 0, VEL = 1, ACCEL = 2, ATT + RATES = 3)"]
11596    pub est_capabilities: u8,
11597}
11598impl FOLLOW_TARGET_DATA {
11599    pub const ENCODED_LEN: usize = 93usize;
11600    pub const DEFAULT: Self = Self {
11601        timestamp: 0_u64,
11602        custom_state: 0_u64,
11603        lat: 0_i32,
11604        lon: 0_i32,
11605        alt: 0.0_f32,
11606        vel: [0.0_f32; 3usize],
11607        acc: [0.0_f32; 3usize],
11608        attitude_q: [0.0_f32; 4usize],
11609        rates: [0.0_f32; 3usize],
11610        position_cov: [0.0_f32; 3usize],
11611        est_capabilities: 0_u8,
11612    };
11613    #[cfg(feature = "arbitrary")]
11614    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11615        use arbitrary::{Arbitrary, Unstructured};
11616        let mut buf = [0u8; 1024];
11617        rng.fill_bytes(&mut buf);
11618        let mut unstructured = Unstructured::new(&buf);
11619        Self::arbitrary(&mut unstructured).unwrap_or_default()
11620    }
11621}
11622impl Default for FOLLOW_TARGET_DATA {
11623    fn default() -> Self {
11624        Self::DEFAULT.clone()
11625    }
11626}
11627impl MessageData for FOLLOW_TARGET_DATA {
11628    type Message = MavMessage;
11629    const ID: u32 = 144u32;
11630    const NAME: &'static str = "FOLLOW_TARGET";
11631    const EXTRA_CRC: u8 = 127u8;
11632    const ENCODED_LEN: usize = 93usize;
11633    fn deser(
11634        _version: MavlinkVersion,
11635        __input: &[u8],
11636    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11637        let avail_len = __input.len();
11638        let mut payload_buf = [0; Self::ENCODED_LEN];
11639        let mut buf = if avail_len < Self::ENCODED_LEN {
11640            payload_buf[0..avail_len].copy_from_slice(__input);
11641            Bytes::new(&payload_buf)
11642        } else {
11643            Bytes::new(__input)
11644        };
11645        let mut __struct = Self::default();
11646        __struct.timestamp = buf.get_u64_le();
11647        __struct.custom_state = buf.get_u64_le();
11648        __struct.lat = buf.get_i32_le();
11649        __struct.lon = buf.get_i32_le();
11650        __struct.alt = buf.get_f32_le();
11651        for v in &mut __struct.vel {
11652            let val = buf.get_f32_le();
11653            *v = val;
11654        }
11655        for v in &mut __struct.acc {
11656            let val = buf.get_f32_le();
11657            *v = val;
11658        }
11659        for v in &mut __struct.attitude_q {
11660            let val = buf.get_f32_le();
11661            *v = val;
11662        }
11663        for v in &mut __struct.rates {
11664            let val = buf.get_f32_le();
11665            *v = val;
11666        }
11667        for v in &mut __struct.position_cov {
11668            let val = buf.get_f32_le();
11669            *v = val;
11670        }
11671        __struct.est_capabilities = buf.get_u8();
11672        Ok(__struct)
11673    }
11674    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11675        let mut __tmp = BytesMut::new(bytes);
11676        #[allow(clippy::absurd_extreme_comparisons)]
11677        #[allow(unused_comparisons)]
11678        if __tmp.remaining() < Self::ENCODED_LEN {
11679            panic!(
11680                "buffer is too small (need {} bytes, but got {})",
11681                Self::ENCODED_LEN,
11682                __tmp.remaining(),
11683            )
11684        }
11685        __tmp.put_u64_le(self.timestamp);
11686        __tmp.put_u64_le(self.custom_state);
11687        __tmp.put_i32_le(self.lat);
11688        __tmp.put_i32_le(self.lon);
11689        __tmp.put_f32_le(self.alt);
11690        for val in &self.vel {
11691            __tmp.put_f32_le(*val);
11692        }
11693        for val in &self.acc {
11694            __tmp.put_f32_le(*val);
11695        }
11696        for val in &self.attitude_q {
11697            __tmp.put_f32_le(*val);
11698        }
11699        for val in &self.rates {
11700            __tmp.put_f32_le(*val);
11701        }
11702        for val in &self.position_cov {
11703            __tmp.put_f32_le(*val);
11704        }
11705        __tmp.put_u8(self.est_capabilities);
11706        if matches!(version, MavlinkVersion::V2) {
11707            let len = __tmp.len();
11708            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11709        } else {
11710            __tmp.len()
11711        }
11712    }
11713}
11714#[doc = "id: 371"]
11715#[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
11716#[derive(Debug, Clone, PartialEq)]
11717#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11718#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11719pub struct FUEL_STATUS_DATA {
11720    #[doc = "Capacity when full. Must be provided."]
11721    pub maximum_fuel: f32,
11722    #[doc = "Consumed fuel (measured). This value should not be inferred: if not measured set to NaN. NaN: field not provided."]
11723    pub consumed_fuel: f32,
11724    #[doc = "Remaining fuel until empty (measured). The value should not be inferred: if not measured set to NaN. NaN: field not provided."]
11725    pub remaining_fuel: f32,
11726    #[doc = "Positive value when emptying/using, and negative if filling/replacing. NaN: field not provided."]
11727    pub flow_rate: f32,
11728    #[doc = "Fuel temperature. NaN: field not provided."]
11729    pub temperature: f32,
11730    #[doc = "Fuel type. Defines units for fuel capacity and consumption fields above."]
11731    pub fuel_type: MavFuelType,
11732    #[doc = "Fuel ID. Must match ID of other messages for same fuel system, such as BATTERY_STATUS_V2."]
11733    pub id: u8,
11734    #[doc = "Percentage of remaining fuel, relative to full. Values: [0-100], UINT8_MAX: field not provided."]
11735    pub percent_remaining: u8,
11736}
11737impl FUEL_STATUS_DATA {
11738    pub const ENCODED_LEN: usize = 26usize;
11739    pub const DEFAULT: Self = Self {
11740        maximum_fuel: 0.0_f32,
11741        consumed_fuel: 0.0_f32,
11742        remaining_fuel: 0.0_f32,
11743        flow_rate: 0.0_f32,
11744        temperature: 0.0_f32,
11745        fuel_type: MavFuelType::DEFAULT,
11746        id: 0_u8,
11747        percent_remaining: 0_u8,
11748    };
11749    #[cfg(feature = "arbitrary")]
11750    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11751        use arbitrary::{Arbitrary, Unstructured};
11752        let mut buf = [0u8; 1024];
11753        rng.fill_bytes(&mut buf);
11754        let mut unstructured = Unstructured::new(&buf);
11755        Self::arbitrary(&mut unstructured).unwrap_or_default()
11756    }
11757}
11758impl Default for FUEL_STATUS_DATA {
11759    fn default() -> Self {
11760        Self::DEFAULT.clone()
11761    }
11762}
11763impl MessageData for FUEL_STATUS_DATA {
11764    type Message = MavMessage;
11765    const ID: u32 = 371u32;
11766    const NAME: &'static str = "FUEL_STATUS";
11767    const EXTRA_CRC: u8 = 10u8;
11768    const ENCODED_LEN: usize = 26usize;
11769    fn deser(
11770        _version: MavlinkVersion,
11771        __input: &[u8],
11772    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11773        let avail_len = __input.len();
11774        let mut payload_buf = [0; Self::ENCODED_LEN];
11775        let mut buf = if avail_len < Self::ENCODED_LEN {
11776            payload_buf[0..avail_len].copy_from_slice(__input);
11777            Bytes::new(&payload_buf)
11778        } else {
11779            Bytes::new(__input)
11780        };
11781        let mut __struct = Self::default();
11782        __struct.maximum_fuel = buf.get_f32_le();
11783        __struct.consumed_fuel = buf.get_f32_le();
11784        __struct.remaining_fuel = buf.get_f32_le();
11785        __struct.flow_rate = buf.get_f32_le();
11786        __struct.temperature = buf.get_f32_le();
11787        let tmp = buf.get_u32_le();
11788        __struct.fuel_type = FromPrimitive::from_u32(tmp).ok_or(
11789            ::mavlink_core::error::ParserError::InvalidEnum {
11790                enum_type: "MavFuelType",
11791                value: tmp as u32,
11792            },
11793        )?;
11794        __struct.id = buf.get_u8();
11795        __struct.percent_remaining = buf.get_u8();
11796        Ok(__struct)
11797    }
11798    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11799        let mut __tmp = BytesMut::new(bytes);
11800        #[allow(clippy::absurd_extreme_comparisons)]
11801        #[allow(unused_comparisons)]
11802        if __tmp.remaining() < Self::ENCODED_LEN {
11803            panic!(
11804                "buffer is too small (need {} bytes, but got {})",
11805                Self::ENCODED_LEN,
11806                __tmp.remaining(),
11807            )
11808        }
11809        __tmp.put_f32_le(self.maximum_fuel);
11810        __tmp.put_f32_le(self.consumed_fuel);
11811        __tmp.put_f32_le(self.remaining_fuel);
11812        __tmp.put_f32_le(self.flow_rate);
11813        __tmp.put_f32_le(self.temperature);
11814        __tmp.put_u32_le(self.fuel_type as u32);
11815        __tmp.put_u8(self.id);
11816        __tmp.put_u8(self.percent_remaining);
11817        if matches!(version, MavlinkVersion::V2) {
11818            let len = __tmp.len();
11819            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11820        } else {
11821            __tmp.len()
11822        }
11823    }
11824}
11825#[doc = "id: 373"]
11826#[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
11827#[derive(Debug, Clone, PartialEq)]
11828#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11829#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11830pub struct GENERATOR_STATUS_DATA {
11831    #[doc = "Status flags."]
11832    pub status: MavGeneratorStatusFlag,
11833    #[doc = "Current into/out of battery. Positive for out. Negative for in. NaN: field not provided."]
11834    pub battery_current: f32,
11835    #[doc = "Current going to the UAV. If battery current not available this is the DC current from the generator. Positive for out. Negative for in. NaN: field not provided"]
11836    pub load_current: f32,
11837    #[doc = "The power being generated. NaN: field not provided"]
11838    pub power_generated: f32,
11839    #[doc = "Voltage of the bus seen at the generator, or battery bus if battery bus is controlled by generator and at a different voltage to main bus."]
11840    pub bus_voltage: f32,
11841    #[doc = "The target battery current. Positive for out. Negative for in. NaN: field not provided"]
11842    pub bat_current_setpoint: f32,
11843    #[doc = "Seconds this generator has run since it was rebooted. UINT32_MAX: field not provided."]
11844    pub runtime: u32,
11845    #[doc = "Seconds until this generator requires maintenance.  A negative value indicates maintenance is past-due. INT32_MAX: field not provided."]
11846    pub time_until_maintenance: i32,
11847    #[doc = "Speed of electrical generator or alternator. UINT16_MAX: field not provided."]
11848    pub generator_speed: u16,
11849    #[doc = "The temperature of the rectifier or power converter. INT16_MAX: field not provided."]
11850    pub rectifier_temperature: i16,
11851    #[doc = "The temperature of the mechanical motor, fuel cell core or generator. INT16_MAX: field not provided."]
11852    pub generator_temperature: i16,
11853}
11854impl GENERATOR_STATUS_DATA {
11855    pub const ENCODED_LEN: usize = 42usize;
11856    pub const DEFAULT: Self = Self {
11857        status: MavGeneratorStatusFlag::DEFAULT,
11858        battery_current: 0.0_f32,
11859        load_current: 0.0_f32,
11860        power_generated: 0.0_f32,
11861        bus_voltage: 0.0_f32,
11862        bat_current_setpoint: 0.0_f32,
11863        runtime: 0_u32,
11864        time_until_maintenance: 0_i32,
11865        generator_speed: 0_u16,
11866        rectifier_temperature: 0_i16,
11867        generator_temperature: 0_i16,
11868    };
11869    #[cfg(feature = "arbitrary")]
11870    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11871        use arbitrary::{Arbitrary, Unstructured};
11872        let mut buf = [0u8; 1024];
11873        rng.fill_bytes(&mut buf);
11874        let mut unstructured = Unstructured::new(&buf);
11875        Self::arbitrary(&mut unstructured).unwrap_or_default()
11876    }
11877}
11878impl Default for GENERATOR_STATUS_DATA {
11879    fn default() -> Self {
11880        Self::DEFAULT.clone()
11881    }
11882}
11883impl MessageData for GENERATOR_STATUS_DATA {
11884    type Message = MavMessage;
11885    const ID: u32 = 373u32;
11886    const NAME: &'static str = "GENERATOR_STATUS";
11887    const EXTRA_CRC: u8 = 117u8;
11888    const ENCODED_LEN: usize = 42usize;
11889    fn deser(
11890        _version: MavlinkVersion,
11891        __input: &[u8],
11892    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11893        let avail_len = __input.len();
11894        let mut payload_buf = [0; Self::ENCODED_LEN];
11895        let mut buf = if avail_len < Self::ENCODED_LEN {
11896            payload_buf[0..avail_len].copy_from_slice(__input);
11897            Bytes::new(&payload_buf)
11898        } else {
11899            Bytes::new(__input)
11900        };
11901        let mut __struct = Self::default();
11902        let tmp = buf.get_u64_le();
11903        __struct.status = MavGeneratorStatusFlag::from_bits(
11904            tmp & MavGeneratorStatusFlag::all().bits(),
11905        )
11906        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
11907            flag_type: "MavGeneratorStatusFlag",
11908            value: tmp as u32,
11909        })?;
11910        __struct.battery_current = buf.get_f32_le();
11911        __struct.load_current = buf.get_f32_le();
11912        __struct.power_generated = buf.get_f32_le();
11913        __struct.bus_voltage = buf.get_f32_le();
11914        __struct.bat_current_setpoint = buf.get_f32_le();
11915        __struct.runtime = buf.get_u32_le();
11916        __struct.time_until_maintenance = buf.get_i32_le();
11917        __struct.generator_speed = buf.get_u16_le();
11918        __struct.rectifier_temperature = buf.get_i16_le();
11919        __struct.generator_temperature = buf.get_i16_le();
11920        Ok(__struct)
11921    }
11922    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11923        let mut __tmp = BytesMut::new(bytes);
11924        #[allow(clippy::absurd_extreme_comparisons)]
11925        #[allow(unused_comparisons)]
11926        if __tmp.remaining() < Self::ENCODED_LEN {
11927            panic!(
11928                "buffer is too small (need {} bytes, but got {})",
11929                Self::ENCODED_LEN,
11930                __tmp.remaining(),
11931            )
11932        }
11933        __tmp.put_u64_le(self.status.bits());
11934        __tmp.put_f32_le(self.battery_current);
11935        __tmp.put_f32_le(self.load_current);
11936        __tmp.put_f32_le(self.power_generated);
11937        __tmp.put_f32_le(self.bus_voltage);
11938        __tmp.put_f32_le(self.bat_current_setpoint);
11939        __tmp.put_u32_le(self.runtime);
11940        __tmp.put_i32_le(self.time_until_maintenance);
11941        __tmp.put_u16_le(self.generator_speed);
11942        __tmp.put_i16_le(self.rectifier_temperature);
11943        __tmp.put_i16_le(self.generator_temperature);
11944        if matches!(version, MavlinkVersion::V2) {
11945            let len = __tmp.len();
11946            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11947        } else {
11948            __tmp.len()
11949        }
11950    }
11951}
11952#[doc = "id: 285"]
11953#[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
11954#[derive(Debug, Clone, PartialEq)]
11955#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11956#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11957pub struct GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
11958    #[doc = "Timestamp (time since system boot)."]
11959    pub time_boot_ms: u32,
11960    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description."]
11961    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11962    pub q: [f32; 4],
11963    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN if unknown."]
11964    pub angular_velocity_x: f32,
11965    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN if unknown."]
11966    pub angular_velocity_y: f32,
11967    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN if unknown."]
11968    pub angular_velocity_z: f32,
11969    #[doc = "Failure flags (0 for no failure)"]
11970    pub failure_flags: GimbalDeviceErrorFlags,
11971    #[doc = "Current gimbal flags set."]
11972    pub flags: GimbalDeviceFlags,
11973    #[doc = "System ID"]
11974    pub target_system: u8,
11975    #[doc = "Component ID"]
11976    pub target_component: u8,
11977    #[doc = "Yaw angle relating the quaternions in earth and body frames (see message description). NaN if unknown."]
11978    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11979    pub delta_yaw: f32,
11980    #[doc = "Yaw angular velocity relating the angular velocities in earth and body frames (see message description). NaN if unknown."]
11981    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11982    pub delta_yaw_velocity: f32,
11983    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
11984    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11985    pub gimbal_device_id: u8,
11986}
11987impl GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
11988    pub const ENCODED_LEN: usize = 49usize;
11989    pub const DEFAULT: Self = Self {
11990        time_boot_ms: 0_u32,
11991        q: [0.0_f32; 4usize],
11992        angular_velocity_x: 0.0_f32,
11993        angular_velocity_y: 0.0_f32,
11994        angular_velocity_z: 0.0_f32,
11995        failure_flags: GimbalDeviceErrorFlags::DEFAULT,
11996        flags: GimbalDeviceFlags::DEFAULT,
11997        target_system: 0_u8,
11998        target_component: 0_u8,
11999        delta_yaw: 0.0_f32,
12000        delta_yaw_velocity: 0.0_f32,
12001        gimbal_device_id: 0_u8,
12002    };
12003    #[cfg(feature = "arbitrary")]
12004    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12005        use arbitrary::{Arbitrary, Unstructured};
12006        let mut buf = [0u8; 1024];
12007        rng.fill_bytes(&mut buf);
12008        let mut unstructured = Unstructured::new(&buf);
12009        Self::arbitrary(&mut unstructured).unwrap_or_default()
12010    }
12011}
12012impl Default for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12013    fn default() -> Self {
12014        Self::DEFAULT.clone()
12015    }
12016}
12017impl MessageData for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12018    type Message = MavMessage;
12019    const ID: u32 = 285u32;
12020    const NAME: &'static str = "GIMBAL_DEVICE_ATTITUDE_STATUS";
12021    const EXTRA_CRC: u8 = 137u8;
12022    const ENCODED_LEN: usize = 49usize;
12023    fn deser(
12024        _version: MavlinkVersion,
12025        __input: &[u8],
12026    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12027        let avail_len = __input.len();
12028        let mut payload_buf = [0; Self::ENCODED_LEN];
12029        let mut buf = if avail_len < Self::ENCODED_LEN {
12030            payload_buf[0..avail_len].copy_from_slice(__input);
12031            Bytes::new(&payload_buf)
12032        } else {
12033            Bytes::new(__input)
12034        };
12035        let mut __struct = Self::default();
12036        __struct.time_boot_ms = buf.get_u32_le();
12037        for v in &mut __struct.q {
12038            let val = buf.get_f32_le();
12039            *v = val;
12040        }
12041        __struct.angular_velocity_x = buf.get_f32_le();
12042        __struct.angular_velocity_y = buf.get_f32_le();
12043        __struct.angular_velocity_z = buf.get_f32_le();
12044        let tmp = buf.get_u32_le();
12045        __struct.failure_flags = GimbalDeviceErrorFlags::from_bits(
12046            tmp & GimbalDeviceErrorFlags::all().bits(),
12047        )
12048        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12049            flag_type: "GimbalDeviceErrorFlags",
12050            value: tmp as u32,
12051        })?;
12052        let tmp = buf.get_u16_le();
12053        __struct.flags = GimbalDeviceFlags::from_bits(tmp & GimbalDeviceFlags::all().bits())
12054            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12055                flag_type: "GimbalDeviceFlags",
12056                value: tmp as u32,
12057            })?;
12058        __struct.target_system = buf.get_u8();
12059        __struct.target_component = buf.get_u8();
12060        __struct.delta_yaw = buf.get_f32_le();
12061        __struct.delta_yaw_velocity = buf.get_f32_le();
12062        __struct.gimbal_device_id = buf.get_u8();
12063        Ok(__struct)
12064    }
12065    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12066        let mut __tmp = BytesMut::new(bytes);
12067        #[allow(clippy::absurd_extreme_comparisons)]
12068        #[allow(unused_comparisons)]
12069        if __tmp.remaining() < Self::ENCODED_LEN {
12070            panic!(
12071                "buffer is too small (need {} bytes, but got {})",
12072                Self::ENCODED_LEN,
12073                __tmp.remaining(),
12074            )
12075        }
12076        __tmp.put_u32_le(self.time_boot_ms);
12077        for val in &self.q {
12078            __tmp.put_f32_le(*val);
12079        }
12080        __tmp.put_f32_le(self.angular_velocity_x);
12081        __tmp.put_f32_le(self.angular_velocity_y);
12082        __tmp.put_f32_le(self.angular_velocity_z);
12083        __tmp.put_u32_le(self.failure_flags.bits());
12084        __tmp.put_u16_le(self.flags.bits());
12085        __tmp.put_u8(self.target_system);
12086        __tmp.put_u8(self.target_component);
12087        __tmp.put_f32_le(self.delta_yaw);
12088        __tmp.put_f32_le(self.delta_yaw_velocity);
12089        __tmp.put_u8(self.gimbal_device_id);
12090        if matches!(version, MavlinkVersion::V2) {
12091            let len = __tmp.len();
12092            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12093        } else {
12094            __tmp.len()
12095        }
12096    }
12097}
12098#[doc = "id: 283"]
12099#[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
12100#[derive(Debug, Clone, PartialEq)]
12101#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12102#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12103pub struct GIMBAL_DEVICE_INFORMATION_DATA {
12104    #[doc = "UID of gimbal hardware (0 if unknown)."]
12105    pub uid: u64,
12106    #[doc = "Timestamp (time since system boot)."]
12107    pub time_boot_ms: u32,
12108    #[doc = "0xff)."]
12109    pub firmware_version: u32,
12110    #[doc = "0xff)."]
12111    pub hardware_version: u32,
12112    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
12113    pub roll_min: f32,
12114    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
12115    pub roll_max: f32,
12116    #[doc = "Minimum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
12117    pub pitch_min: f32,
12118    #[doc = "Maximum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
12119    pub pitch_max: f32,
12120    #[doc = "Minimum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
12121    pub yaw_min: f32,
12122    #[doc = "Maximum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
12123    pub yaw_max: f32,
12124    #[doc = "Bitmap of gimbal capability flags."]
12125    pub cap_flags: GimbalDeviceCapFlags,
12126    #[doc = "Bitmap for use for gimbal-specific capability flags."]
12127    pub custom_cap_flags: u16,
12128    #[doc = "Name of the gimbal vendor."]
12129    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12130    pub vendor_name: [u8; 32],
12131    #[doc = "Name of the gimbal model."]
12132    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12133    pub model_name: [u8; 32],
12134    #[doc = "Custom name of the gimbal given to it by the user."]
12135    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12136    pub custom_name: [u8; 32],
12137    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set to a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
12138    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12139    pub gimbal_device_id: u8,
12140}
12141impl GIMBAL_DEVICE_INFORMATION_DATA {
12142    pub const ENCODED_LEN: usize = 145usize;
12143    pub const DEFAULT: Self = Self {
12144        uid: 0_u64,
12145        time_boot_ms: 0_u32,
12146        firmware_version: 0_u32,
12147        hardware_version: 0_u32,
12148        roll_min: 0.0_f32,
12149        roll_max: 0.0_f32,
12150        pitch_min: 0.0_f32,
12151        pitch_max: 0.0_f32,
12152        yaw_min: 0.0_f32,
12153        yaw_max: 0.0_f32,
12154        cap_flags: GimbalDeviceCapFlags::DEFAULT,
12155        custom_cap_flags: 0_u16,
12156        vendor_name: [0_u8; 32usize],
12157        model_name: [0_u8; 32usize],
12158        custom_name: [0_u8; 32usize],
12159        gimbal_device_id: 0_u8,
12160    };
12161    #[cfg(feature = "arbitrary")]
12162    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12163        use arbitrary::{Arbitrary, Unstructured};
12164        let mut buf = [0u8; 1024];
12165        rng.fill_bytes(&mut buf);
12166        let mut unstructured = Unstructured::new(&buf);
12167        Self::arbitrary(&mut unstructured).unwrap_or_default()
12168    }
12169}
12170impl Default for GIMBAL_DEVICE_INFORMATION_DATA {
12171    fn default() -> Self {
12172        Self::DEFAULT.clone()
12173    }
12174}
12175impl MessageData for GIMBAL_DEVICE_INFORMATION_DATA {
12176    type Message = MavMessage;
12177    const ID: u32 = 283u32;
12178    const NAME: &'static str = "GIMBAL_DEVICE_INFORMATION";
12179    const EXTRA_CRC: u8 = 74u8;
12180    const ENCODED_LEN: usize = 145usize;
12181    fn deser(
12182        _version: MavlinkVersion,
12183        __input: &[u8],
12184    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12185        let avail_len = __input.len();
12186        let mut payload_buf = [0; Self::ENCODED_LEN];
12187        let mut buf = if avail_len < Self::ENCODED_LEN {
12188            payload_buf[0..avail_len].copy_from_slice(__input);
12189            Bytes::new(&payload_buf)
12190        } else {
12191            Bytes::new(__input)
12192        };
12193        let mut __struct = Self::default();
12194        __struct.uid = buf.get_u64_le();
12195        __struct.time_boot_ms = buf.get_u32_le();
12196        __struct.firmware_version = buf.get_u32_le();
12197        __struct.hardware_version = buf.get_u32_le();
12198        __struct.roll_min = buf.get_f32_le();
12199        __struct.roll_max = buf.get_f32_le();
12200        __struct.pitch_min = buf.get_f32_le();
12201        __struct.pitch_max = buf.get_f32_le();
12202        __struct.yaw_min = buf.get_f32_le();
12203        __struct.yaw_max = buf.get_f32_le();
12204        let tmp = buf.get_u16_le();
12205        __struct.cap_flags = GimbalDeviceCapFlags::from_bits(
12206            tmp & GimbalDeviceCapFlags::all().bits(),
12207        )
12208        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12209            flag_type: "GimbalDeviceCapFlags",
12210            value: tmp as u32,
12211        })?;
12212        __struct.custom_cap_flags = buf.get_u16_le();
12213        for v in &mut __struct.vendor_name {
12214            let val = buf.get_u8();
12215            *v = val;
12216        }
12217        for v in &mut __struct.model_name {
12218            let val = buf.get_u8();
12219            *v = val;
12220        }
12221        for v in &mut __struct.custom_name {
12222            let val = buf.get_u8();
12223            *v = val;
12224        }
12225        __struct.gimbal_device_id = buf.get_u8();
12226        Ok(__struct)
12227    }
12228    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12229        let mut __tmp = BytesMut::new(bytes);
12230        #[allow(clippy::absurd_extreme_comparisons)]
12231        #[allow(unused_comparisons)]
12232        if __tmp.remaining() < Self::ENCODED_LEN {
12233            panic!(
12234                "buffer is too small (need {} bytes, but got {})",
12235                Self::ENCODED_LEN,
12236                __tmp.remaining(),
12237            )
12238        }
12239        __tmp.put_u64_le(self.uid);
12240        __tmp.put_u32_le(self.time_boot_ms);
12241        __tmp.put_u32_le(self.firmware_version);
12242        __tmp.put_u32_le(self.hardware_version);
12243        __tmp.put_f32_le(self.roll_min);
12244        __tmp.put_f32_le(self.roll_max);
12245        __tmp.put_f32_le(self.pitch_min);
12246        __tmp.put_f32_le(self.pitch_max);
12247        __tmp.put_f32_le(self.yaw_min);
12248        __tmp.put_f32_le(self.yaw_max);
12249        __tmp.put_u16_le(self.cap_flags.bits());
12250        __tmp.put_u16_le(self.custom_cap_flags);
12251        for val in &self.vendor_name {
12252            __tmp.put_u8(*val);
12253        }
12254        for val in &self.model_name {
12255            __tmp.put_u8(*val);
12256        }
12257        for val in &self.custom_name {
12258            __tmp.put_u8(*val);
12259        }
12260        __tmp.put_u8(self.gimbal_device_id);
12261        if matches!(version, MavlinkVersion::V2) {
12262            let len = __tmp.len();
12263            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12264        } else {
12265            __tmp.len()
12266        }
12267    }
12268}
12269#[doc = "id: 284"]
12270#[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
12271#[derive(Debug, Clone, PartialEq)]
12272#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12273#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12274pub struct GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12275    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description. Set fields to NaN to be ignored."]
12276    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12277    pub q: [f32; 4],
12278    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN to be ignored."]
12279    pub angular_velocity_x: f32,
12280    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN to be ignored."]
12281    pub angular_velocity_y: f32,
12282    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN to be ignored."]
12283    pub angular_velocity_z: f32,
12284    #[doc = "Low level gimbal flags."]
12285    pub flags: GimbalDeviceFlags,
12286    #[doc = "System ID"]
12287    pub target_system: u8,
12288    #[doc = "Component ID"]
12289    pub target_component: u8,
12290}
12291impl GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12292    pub const ENCODED_LEN: usize = 32usize;
12293    pub const DEFAULT: Self = Self {
12294        q: [0.0_f32; 4usize],
12295        angular_velocity_x: 0.0_f32,
12296        angular_velocity_y: 0.0_f32,
12297        angular_velocity_z: 0.0_f32,
12298        flags: GimbalDeviceFlags::DEFAULT,
12299        target_system: 0_u8,
12300        target_component: 0_u8,
12301    };
12302    #[cfg(feature = "arbitrary")]
12303    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12304        use arbitrary::{Arbitrary, Unstructured};
12305        let mut buf = [0u8; 1024];
12306        rng.fill_bytes(&mut buf);
12307        let mut unstructured = Unstructured::new(&buf);
12308        Self::arbitrary(&mut unstructured).unwrap_or_default()
12309    }
12310}
12311impl Default for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12312    fn default() -> Self {
12313        Self::DEFAULT.clone()
12314    }
12315}
12316impl MessageData for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12317    type Message = MavMessage;
12318    const ID: u32 = 284u32;
12319    const NAME: &'static str = "GIMBAL_DEVICE_SET_ATTITUDE";
12320    const EXTRA_CRC: u8 = 99u8;
12321    const ENCODED_LEN: usize = 32usize;
12322    fn deser(
12323        _version: MavlinkVersion,
12324        __input: &[u8],
12325    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12326        let avail_len = __input.len();
12327        let mut payload_buf = [0; Self::ENCODED_LEN];
12328        let mut buf = if avail_len < Self::ENCODED_LEN {
12329            payload_buf[0..avail_len].copy_from_slice(__input);
12330            Bytes::new(&payload_buf)
12331        } else {
12332            Bytes::new(__input)
12333        };
12334        let mut __struct = Self::default();
12335        for v in &mut __struct.q {
12336            let val = buf.get_f32_le();
12337            *v = val;
12338        }
12339        __struct.angular_velocity_x = buf.get_f32_le();
12340        __struct.angular_velocity_y = buf.get_f32_le();
12341        __struct.angular_velocity_z = buf.get_f32_le();
12342        let tmp = buf.get_u16_le();
12343        __struct.flags = GimbalDeviceFlags::from_bits(tmp & GimbalDeviceFlags::all().bits())
12344            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12345                flag_type: "GimbalDeviceFlags",
12346                value: tmp as u32,
12347            })?;
12348        __struct.target_system = buf.get_u8();
12349        __struct.target_component = buf.get_u8();
12350        Ok(__struct)
12351    }
12352    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12353        let mut __tmp = BytesMut::new(bytes);
12354        #[allow(clippy::absurd_extreme_comparisons)]
12355        #[allow(unused_comparisons)]
12356        if __tmp.remaining() < Self::ENCODED_LEN {
12357            panic!(
12358                "buffer is too small (need {} bytes, but got {})",
12359                Self::ENCODED_LEN,
12360                __tmp.remaining(),
12361            )
12362        }
12363        for val in &self.q {
12364            __tmp.put_f32_le(*val);
12365        }
12366        __tmp.put_f32_le(self.angular_velocity_x);
12367        __tmp.put_f32_le(self.angular_velocity_y);
12368        __tmp.put_f32_le(self.angular_velocity_z);
12369        __tmp.put_u16_le(self.flags.bits());
12370        __tmp.put_u8(self.target_system);
12371        __tmp.put_u8(self.target_component);
12372        if matches!(version, MavlinkVersion::V2) {
12373            let len = __tmp.len();
12374            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12375        } else {
12376            __tmp.len()
12377        }
12378    }
12379}
12380#[doc = "id: 280"]
12381#[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
12382#[derive(Debug, Clone, PartialEq)]
12383#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12384#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12385pub struct GIMBAL_MANAGER_INFORMATION_DATA {
12386    #[doc = "Timestamp (time since system boot)."]
12387    pub time_boot_ms: u32,
12388    #[doc = "Bitmap of gimbal capability flags."]
12389    pub cap_flags: GimbalManagerCapFlags,
12390    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
12391    pub roll_min: f32,
12392    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
12393    pub roll_max: f32,
12394    #[doc = "Minimum pitch angle (positive: up, negative: down)"]
12395    pub pitch_min: f32,
12396    #[doc = "Maximum pitch angle (positive: up, negative: down)"]
12397    pub pitch_max: f32,
12398    #[doc = "Minimum yaw angle (positive: to the right, negative: to the left)"]
12399    pub yaw_min: f32,
12400    #[doc = "Maximum yaw angle (positive: to the right, negative: to the left)"]
12401    pub yaw_max: f32,
12402    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
12403    pub gimbal_device_id: u8,
12404}
12405impl GIMBAL_MANAGER_INFORMATION_DATA {
12406    pub const ENCODED_LEN: usize = 33usize;
12407    pub const DEFAULT: Self = Self {
12408        time_boot_ms: 0_u32,
12409        cap_flags: GimbalManagerCapFlags::DEFAULT,
12410        roll_min: 0.0_f32,
12411        roll_max: 0.0_f32,
12412        pitch_min: 0.0_f32,
12413        pitch_max: 0.0_f32,
12414        yaw_min: 0.0_f32,
12415        yaw_max: 0.0_f32,
12416        gimbal_device_id: 0_u8,
12417    };
12418    #[cfg(feature = "arbitrary")]
12419    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12420        use arbitrary::{Arbitrary, Unstructured};
12421        let mut buf = [0u8; 1024];
12422        rng.fill_bytes(&mut buf);
12423        let mut unstructured = Unstructured::new(&buf);
12424        Self::arbitrary(&mut unstructured).unwrap_or_default()
12425    }
12426}
12427impl Default for GIMBAL_MANAGER_INFORMATION_DATA {
12428    fn default() -> Self {
12429        Self::DEFAULT.clone()
12430    }
12431}
12432impl MessageData for GIMBAL_MANAGER_INFORMATION_DATA {
12433    type Message = MavMessage;
12434    const ID: u32 = 280u32;
12435    const NAME: &'static str = "GIMBAL_MANAGER_INFORMATION";
12436    const EXTRA_CRC: u8 = 70u8;
12437    const ENCODED_LEN: usize = 33usize;
12438    fn deser(
12439        _version: MavlinkVersion,
12440        __input: &[u8],
12441    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12442        let avail_len = __input.len();
12443        let mut payload_buf = [0; Self::ENCODED_LEN];
12444        let mut buf = if avail_len < Self::ENCODED_LEN {
12445            payload_buf[0..avail_len].copy_from_slice(__input);
12446            Bytes::new(&payload_buf)
12447        } else {
12448            Bytes::new(__input)
12449        };
12450        let mut __struct = Self::default();
12451        __struct.time_boot_ms = buf.get_u32_le();
12452        let tmp = buf.get_u32_le();
12453        __struct.cap_flags = GimbalManagerCapFlags::from_bits(
12454            tmp & GimbalManagerCapFlags::all().bits(),
12455        )
12456        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12457            flag_type: "GimbalManagerCapFlags",
12458            value: tmp as u32,
12459        })?;
12460        __struct.roll_min = buf.get_f32_le();
12461        __struct.roll_max = buf.get_f32_le();
12462        __struct.pitch_min = buf.get_f32_le();
12463        __struct.pitch_max = buf.get_f32_le();
12464        __struct.yaw_min = buf.get_f32_le();
12465        __struct.yaw_max = buf.get_f32_le();
12466        __struct.gimbal_device_id = buf.get_u8();
12467        Ok(__struct)
12468    }
12469    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12470        let mut __tmp = BytesMut::new(bytes);
12471        #[allow(clippy::absurd_extreme_comparisons)]
12472        #[allow(unused_comparisons)]
12473        if __tmp.remaining() < Self::ENCODED_LEN {
12474            panic!(
12475                "buffer is too small (need {} bytes, but got {})",
12476                Self::ENCODED_LEN,
12477                __tmp.remaining(),
12478            )
12479        }
12480        __tmp.put_u32_le(self.time_boot_ms);
12481        __tmp.put_u32_le(self.cap_flags.bits());
12482        __tmp.put_f32_le(self.roll_min);
12483        __tmp.put_f32_le(self.roll_max);
12484        __tmp.put_f32_le(self.pitch_min);
12485        __tmp.put_f32_le(self.pitch_max);
12486        __tmp.put_f32_le(self.yaw_min);
12487        __tmp.put_f32_le(self.yaw_max);
12488        __tmp.put_u8(self.gimbal_device_id);
12489        if matches!(version, MavlinkVersion::V2) {
12490            let len = __tmp.len();
12491            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12492        } else {
12493            __tmp.len()
12494        }
12495    }
12496}
12497#[doc = "id: 282"]
12498#[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
12499#[derive(Debug, Clone, PartialEq)]
12500#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12501#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12502pub struct GIMBAL_MANAGER_SET_ATTITUDE_DATA {
12503    #[doc = "High level gimbal manager flags to use."]
12504    pub flags: GimbalManagerFlags,
12505    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation, the frame is depends on whether the flag GIMBAL_MANAGER_FLAGS_YAW_LOCK is set)"]
12506    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12507    pub q: [f32; 4],
12508    #[doc = "X component of angular velocity, positive is rolling to the right, NaN to be ignored."]
12509    pub angular_velocity_x: f32,
12510    #[doc = "Y component of angular velocity, positive is pitching up, NaN to be ignored."]
12511    pub angular_velocity_y: f32,
12512    #[doc = "Z component of angular velocity, positive is yawing to the right, NaN to be ignored."]
12513    pub angular_velocity_z: f32,
12514    #[doc = "System ID"]
12515    pub target_system: u8,
12516    #[doc = "Component ID"]
12517    pub target_component: u8,
12518    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
12519    pub gimbal_device_id: u8,
12520}
12521impl GIMBAL_MANAGER_SET_ATTITUDE_DATA {
12522    pub const ENCODED_LEN: usize = 35usize;
12523    pub const DEFAULT: Self = Self {
12524        flags: GimbalManagerFlags::DEFAULT,
12525        q: [0.0_f32; 4usize],
12526        angular_velocity_x: 0.0_f32,
12527        angular_velocity_y: 0.0_f32,
12528        angular_velocity_z: 0.0_f32,
12529        target_system: 0_u8,
12530        target_component: 0_u8,
12531        gimbal_device_id: 0_u8,
12532    };
12533    #[cfg(feature = "arbitrary")]
12534    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12535        use arbitrary::{Arbitrary, Unstructured};
12536        let mut buf = [0u8; 1024];
12537        rng.fill_bytes(&mut buf);
12538        let mut unstructured = Unstructured::new(&buf);
12539        Self::arbitrary(&mut unstructured).unwrap_or_default()
12540    }
12541}
12542impl Default for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
12543    fn default() -> Self {
12544        Self::DEFAULT.clone()
12545    }
12546}
12547impl MessageData for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
12548    type Message = MavMessage;
12549    const ID: u32 = 282u32;
12550    const NAME: &'static str = "GIMBAL_MANAGER_SET_ATTITUDE";
12551    const EXTRA_CRC: u8 = 123u8;
12552    const ENCODED_LEN: usize = 35usize;
12553    fn deser(
12554        _version: MavlinkVersion,
12555        __input: &[u8],
12556    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12557        let avail_len = __input.len();
12558        let mut payload_buf = [0; Self::ENCODED_LEN];
12559        let mut buf = if avail_len < Self::ENCODED_LEN {
12560            payload_buf[0..avail_len].copy_from_slice(__input);
12561            Bytes::new(&payload_buf)
12562        } else {
12563            Bytes::new(__input)
12564        };
12565        let mut __struct = Self::default();
12566        let tmp = buf.get_u32_le();
12567        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
12568            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12569                flag_type: "GimbalManagerFlags",
12570                value: tmp as u32,
12571            })?;
12572        for v in &mut __struct.q {
12573            let val = buf.get_f32_le();
12574            *v = val;
12575        }
12576        __struct.angular_velocity_x = buf.get_f32_le();
12577        __struct.angular_velocity_y = buf.get_f32_le();
12578        __struct.angular_velocity_z = buf.get_f32_le();
12579        __struct.target_system = buf.get_u8();
12580        __struct.target_component = buf.get_u8();
12581        __struct.gimbal_device_id = buf.get_u8();
12582        Ok(__struct)
12583    }
12584    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12585        let mut __tmp = BytesMut::new(bytes);
12586        #[allow(clippy::absurd_extreme_comparisons)]
12587        #[allow(unused_comparisons)]
12588        if __tmp.remaining() < Self::ENCODED_LEN {
12589            panic!(
12590                "buffer is too small (need {} bytes, but got {})",
12591                Self::ENCODED_LEN,
12592                __tmp.remaining(),
12593            )
12594        }
12595        __tmp.put_u32_le(self.flags.bits());
12596        for val in &self.q {
12597            __tmp.put_f32_le(*val);
12598        }
12599        __tmp.put_f32_le(self.angular_velocity_x);
12600        __tmp.put_f32_le(self.angular_velocity_y);
12601        __tmp.put_f32_le(self.angular_velocity_z);
12602        __tmp.put_u8(self.target_system);
12603        __tmp.put_u8(self.target_component);
12604        __tmp.put_u8(self.gimbal_device_id);
12605        if matches!(version, MavlinkVersion::V2) {
12606            let len = __tmp.len();
12607            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12608        } else {
12609            __tmp.len()
12610        }
12611    }
12612}
12613#[doc = "id: 288"]
12614#[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
12615#[derive(Debug, Clone, PartialEq)]
12616#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12617#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12618pub struct GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
12619    #[doc = "High level gimbal manager flags."]
12620    pub flags: GimbalManagerFlags,
12621    #[doc = "Pitch angle unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
12622    pub pitch: f32,
12623    #[doc = "Yaw angle unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
12624    pub yaw: f32,
12625    #[doc = "Pitch angular rate unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
12626    pub pitch_rate: f32,
12627    #[doc = "Yaw angular rate unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
12628    pub yaw_rate: f32,
12629    #[doc = "System ID"]
12630    pub target_system: u8,
12631    #[doc = "Component ID"]
12632    pub target_component: u8,
12633    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
12634    pub gimbal_device_id: u8,
12635}
12636impl GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
12637    pub const ENCODED_LEN: usize = 23usize;
12638    pub const DEFAULT: Self = Self {
12639        flags: GimbalManagerFlags::DEFAULT,
12640        pitch: 0.0_f32,
12641        yaw: 0.0_f32,
12642        pitch_rate: 0.0_f32,
12643        yaw_rate: 0.0_f32,
12644        target_system: 0_u8,
12645        target_component: 0_u8,
12646        gimbal_device_id: 0_u8,
12647    };
12648    #[cfg(feature = "arbitrary")]
12649    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12650        use arbitrary::{Arbitrary, Unstructured};
12651        let mut buf = [0u8; 1024];
12652        rng.fill_bytes(&mut buf);
12653        let mut unstructured = Unstructured::new(&buf);
12654        Self::arbitrary(&mut unstructured).unwrap_or_default()
12655    }
12656}
12657impl Default for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
12658    fn default() -> Self {
12659        Self::DEFAULT.clone()
12660    }
12661}
12662impl MessageData for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
12663    type Message = MavMessage;
12664    const ID: u32 = 288u32;
12665    const NAME: &'static str = "GIMBAL_MANAGER_SET_MANUAL_CONTROL";
12666    const EXTRA_CRC: u8 = 20u8;
12667    const ENCODED_LEN: usize = 23usize;
12668    fn deser(
12669        _version: MavlinkVersion,
12670        __input: &[u8],
12671    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12672        let avail_len = __input.len();
12673        let mut payload_buf = [0; Self::ENCODED_LEN];
12674        let mut buf = if avail_len < Self::ENCODED_LEN {
12675            payload_buf[0..avail_len].copy_from_slice(__input);
12676            Bytes::new(&payload_buf)
12677        } else {
12678            Bytes::new(__input)
12679        };
12680        let mut __struct = Self::default();
12681        let tmp = buf.get_u32_le();
12682        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
12683            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12684                flag_type: "GimbalManagerFlags",
12685                value: tmp as u32,
12686            })?;
12687        __struct.pitch = buf.get_f32_le();
12688        __struct.yaw = buf.get_f32_le();
12689        __struct.pitch_rate = buf.get_f32_le();
12690        __struct.yaw_rate = buf.get_f32_le();
12691        __struct.target_system = buf.get_u8();
12692        __struct.target_component = buf.get_u8();
12693        __struct.gimbal_device_id = buf.get_u8();
12694        Ok(__struct)
12695    }
12696    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12697        let mut __tmp = BytesMut::new(bytes);
12698        #[allow(clippy::absurd_extreme_comparisons)]
12699        #[allow(unused_comparisons)]
12700        if __tmp.remaining() < Self::ENCODED_LEN {
12701            panic!(
12702                "buffer is too small (need {} bytes, but got {})",
12703                Self::ENCODED_LEN,
12704                __tmp.remaining(),
12705            )
12706        }
12707        __tmp.put_u32_le(self.flags.bits());
12708        __tmp.put_f32_le(self.pitch);
12709        __tmp.put_f32_le(self.yaw);
12710        __tmp.put_f32_le(self.pitch_rate);
12711        __tmp.put_f32_le(self.yaw_rate);
12712        __tmp.put_u8(self.target_system);
12713        __tmp.put_u8(self.target_component);
12714        __tmp.put_u8(self.gimbal_device_id);
12715        if matches!(version, MavlinkVersion::V2) {
12716            let len = __tmp.len();
12717            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12718        } else {
12719            __tmp.len()
12720        }
12721    }
12722}
12723#[doc = "id: 287"]
12724#[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
12725#[derive(Debug, Clone, PartialEq)]
12726#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12727#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12728pub struct GIMBAL_MANAGER_SET_PITCHYAW_DATA {
12729    #[doc = "High level gimbal manager flags to use."]
12730    pub flags: GimbalManagerFlags,
12731    #[doc = "Pitch angle (positive: up, negative: down, NaN to be ignored)."]
12732    pub pitch: f32,
12733    #[doc = "Yaw angle (positive: to the right, negative: to the left, NaN to be ignored)."]
12734    pub yaw: f32,
12735    #[doc = "Pitch angular rate (positive: up, negative: down, NaN to be ignored)."]
12736    pub pitch_rate: f32,
12737    #[doc = "Yaw angular rate (positive: to the right, negative: to the left, NaN to be ignored)."]
12738    pub yaw_rate: f32,
12739    #[doc = "System ID"]
12740    pub target_system: u8,
12741    #[doc = "Component ID"]
12742    pub target_component: u8,
12743    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
12744    pub gimbal_device_id: u8,
12745}
12746impl GIMBAL_MANAGER_SET_PITCHYAW_DATA {
12747    pub const ENCODED_LEN: usize = 23usize;
12748    pub const DEFAULT: Self = Self {
12749        flags: GimbalManagerFlags::DEFAULT,
12750        pitch: 0.0_f32,
12751        yaw: 0.0_f32,
12752        pitch_rate: 0.0_f32,
12753        yaw_rate: 0.0_f32,
12754        target_system: 0_u8,
12755        target_component: 0_u8,
12756        gimbal_device_id: 0_u8,
12757    };
12758    #[cfg(feature = "arbitrary")]
12759    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12760        use arbitrary::{Arbitrary, Unstructured};
12761        let mut buf = [0u8; 1024];
12762        rng.fill_bytes(&mut buf);
12763        let mut unstructured = Unstructured::new(&buf);
12764        Self::arbitrary(&mut unstructured).unwrap_or_default()
12765    }
12766}
12767impl Default for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
12768    fn default() -> Self {
12769        Self::DEFAULT.clone()
12770    }
12771}
12772impl MessageData for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
12773    type Message = MavMessage;
12774    const ID: u32 = 287u32;
12775    const NAME: &'static str = "GIMBAL_MANAGER_SET_PITCHYAW";
12776    const EXTRA_CRC: u8 = 1u8;
12777    const ENCODED_LEN: usize = 23usize;
12778    fn deser(
12779        _version: MavlinkVersion,
12780        __input: &[u8],
12781    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12782        let avail_len = __input.len();
12783        let mut payload_buf = [0; Self::ENCODED_LEN];
12784        let mut buf = if avail_len < Self::ENCODED_LEN {
12785            payload_buf[0..avail_len].copy_from_slice(__input);
12786            Bytes::new(&payload_buf)
12787        } else {
12788            Bytes::new(__input)
12789        };
12790        let mut __struct = Self::default();
12791        let tmp = buf.get_u32_le();
12792        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
12793            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12794                flag_type: "GimbalManagerFlags",
12795                value: tmp as u32,
12796            })?;
12797        __struct.pitch = buf.get_f32_le();
12798        __struct.yaw = buf.get_f32_le();
12799        __struct.pitch_rate = buf.get_f32_le();
12800        __struct.yaw_rate = buf.get_f32_le();
12801        __struct.target_system = buf.get_u8();
12802        __struct.target_component = buf.get_u8();
12803        __struct.gimbal_device_id = buf.get_u8();
12804        Ok(__struct)
12805    }
12806    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12807        let mut __tmp = BytesMut::new(bytes);
12808        #[allow(clippy::absurd_extreme_comparisons)]
12809        #[allow(unused_comparisons)]
12810        if __tmp.remaining() < Self::ENCODED_LEN {
12811            panic!(
12812                "buffer is too small (need {} bytes, but got {})",
12813                Self::ENCODED_LEN,
12814                __tmp.remaining(),
12815            )
12816        }
12817        __tmp.put_u32_le(self.flags.bits());
12818        __tmp.put_f32_le(self.pitch);
12819        __tmp.put_f32_le(self.yaw);
12820        __tmp.put_f32_le(self.pitch_rate);
12821        __tmp.put_f32_le(self.yaw_rate);
12822        __tmp.put_u8(self.target_system);
12823        __tmp.put_u8(self.target_component);
12824        __tmp.put_u8(self.gimbal_device_id);
12825        if matches!(version, MavlinkVersion::V2) {
12826            let len = __tmp.len();
12827            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12828        } else {
12829            __tmp.len()
12830        }
12831    }
12832}
12833#[doc = "id: 281"]
12834#[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
12835#[derive(Debug, Clone, PartialEq)]
12836#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12837#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12838pub struct GIMBAL_MANAGER_STATUS_DATA {
12839    #[doc = "Timestamp (time since system boot)."]
12840    pub time_boot_ms: u32,
12841    #[doc = "High level gimbal manager flags currently applied."]
12842    pub flags: GimbalManagerFlags,
12843    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
12844    pub gimbal_device_id: u8,
12845    #[doc = "System ID of MAVLink component with primary control, 0 for none."]
12846    pub primary_control_sysid: u8,
12847    #[doc = "Component ID of MAVLink component with primary control, 0 for none."]
12848    pub primary_control_compid: u8,
12849    #[doc = "System ID of MAVLink component with secondary control, 0 for none."]
12850    pub secondary_control_sysid: u8,
12851    #[doc = "Component ID of MAVLink component with secondary control, 0 for none."]
12852    pub secondary_control_compid: u8,
12853}
12854impl GIMBAL_MANAGER_STATUS_DATA {
12855    pub const ENCODED_LEN: usize = 13usize;
12856    pub const DEFAULT: Self = Self {
12857        time_boot_ms: 0_u32,
12858        flags: GimbalManagerFlags::DEFAULT,
12859        gimbal_device_id: 0_u8,
12860        primary_control_sysid: 0_u8,
12861        primary_control_compid: 0_u8,
12862        secondary_control_sysid: 0_u8,
12863        secondary_control_compid: 0_u8,
12864    };
12865    #[cfg(feature = "arbitrary")]
12866    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12867        use arbitrary::{Arbitrary, Unstructured};
12868        let mut buf = [0u8; 1024];
12869        rng.fill_bytes(&mut buf);
12870        let mut unstructured = Unstructured::new(&buf);
12871        Self::arbitrary(&mut unstructured).unwrap_or_default()
12872    }
12873}
12874impl Default for GIMBAL_MANAGER_STATUS_DATA {
12875    fn default() -> Self {
12876        Self::DEFAULT.clone()
12877    }
12878}
12879impl MessageData for GIMBAL_MANAGER_STATUS_DATA {
12880    type Message = MavMessage;
12881    const ID: u32 = 281u32;
12882    const NAME: &'static str = "GIMBAL_MANAGER_STATUS";
12883    const EXTRA_CRC: u8 = 48u8;
12884    const ENCODED_LEN: usize = 13usize;
12885    fn deser(
12886        _version: MavlinkVersion,
12887        __input: &[u8],
12888    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12889        let avail_len = __input.len();
12890        let mut payload_buf = [0; Self::ENCODED_LEN];
12891        let mut buf = if avail_len < Self::ENCODED_LEN {
12892            payload_buf[0..avail_len].copy_from_slice(__input);
12893            Bytes::new(&payload_buf)
12894        } else {
12895            Bytes::new(__input)
12896        };
12897        let mut __struct = Self::default();
12898        __struct.time_boot_ms = buf.get_u32_le();
12899        let tmp = buf.get_u32_le();
12900        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
12901            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12902                flag_type: "GimbalManagerFlags",
12903                value: tmp as u32,
12904            })?;
12905        __struct.gimbal_device_id = buf.get_u8();
12906        __struct.primary_control_sysid = buf.get_u8();
12907        __struct.primary_control_compid = buf.get_u8();
12908        __struct.secondary_control_sysid = buf.get_u8();
12909        __struct.secondary_control_compid = buf.get_u8();
12910        Ok(__struct)
12911    }
12912    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12913        let mut __tmp = BytesMut::new(bytes);
12914        #[allow(clippy::absurd_extreme_comparisons)]
12915        #[allow(unused_comparisons)]
12916        if __tmp.remaining() < Self::ENCODED_LEN {
12917            panic!(
12918                "buffer is too small (need {} bytes, but got {})",
12919                Self::ENCODED_LEN,
12920                __tmp.remaining(),
12921            )
12922        }
12923        __tmp.put_u32_le(self.time_boot_ms);
12924        __tmp.put_u32_le(self.flags.bits());
12925        __tmp.put_u8(self.gimbal_device_id);
12926        __tmp.put_u8(self.primary_control_sysid);
12927        __tmp.put_u8(self.primary_control_compid);
12928        __tmp.put_u8(self.secondary_control_sysid);
12929        __tmp.put_u8(self.secondary_control_compid);
12930        if matches!(version, MavlinkVersion::V2) {
12931            let len = __tmp.len();
12932            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12933        } else {
12934            __tmp.len()
12935        }
12936    }
12937}
12938#[doc = "id: 33"]
12939#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
12940#[derive(Debug, Clone, PartialEq)]
12941#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12942#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12943pub struct GLOBAL_POSITION_INT_DATA {
12944    #[doc = "Timestamp (time since system boot)."]
12945    pub time_boot_ms: u32,
12946    #[doc = "Latitude, expressed"]
12947    pub lat: i32,
12948    #[doc = "Longitude, expressed"]
12949    pub lon: i32,
12950    #[doc = "Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL."]
12951    pub alt: i32,
12952    #[doc = "Altitude above home"]
12953    pub relative_alt: i32,
12954    #[doc = "Ground X Speed (Latitude, positive north)"]
12955    pub vx: i16,
12956    #[doc = "Ground Y Speed (Longitude, positive east)"]
12957    pub vy: i16,
12958    #[doc = "Ground Z Speed (Altitude, positive down)"]
12959    pub vz: i16,
12960    #[doc = "Vehicle heading (yaw angle), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
12961    pub hdg: u16,
12962}
12963impl GLOBAL_POSITION_INT_DATA {
12964    pub const ENCODED_LEN: usize = 28usize;
12965    pub const DEFAULT: Self = Self {
12966        time_boot_ms: 0_u32,
12967        lat: 0_i32,
12968        lon: 0_i32,
12969        alt: 0_i32,
12970        relative_alt: 0_i32,
12971        vx: 0_i16,
12972        vy: 0_i16,
12973        vz: 0_i16,
12974        hdg: 0_u16,
12975    };
12976    #[cfg(feature = "arbitrary")]
12977    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12978        use arbitrary::{Arbitrary, Unstructured};
12979        let mut buf = [0u8; 1024];
12980        rng.fill_bytes(&mut buf);
12981        let mut unstructured = Unstructured::new(&buf);
12982        Self::arbitrary(&mut unstructured).unwrap_or_default()
12983    }
12984}
12985impl Default for GLOBAL_POSITION_INT_DATA {
12986    fn default() -> Self {
12987        Self::DEFAULT.clone()
12988    }
12989}
12990impl MessageData for GLOBAL_POSITION_INT_DATA {
12991    type Message = MavMessage;
12992    const ID: u32 = 33u32;
12993    const NAME: &'static str = "GLOBAL_POSITION_INT";
12994    const EXTRA_CRC: u8 = 104u8;
12995    const ENCODED_LEN: usize = 28usize;
12996    fn deser(
12997        _version: MavlinkVersion,
12998        __input: &[u8],
12999    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13000        let avail_len = __input.len();
13001        let mut payload_buf = [0; Self::ENCODED_LEN];
13002        let mut buf = if avail_len < Self::ENCODED_LEN {
13003            payload_buf[0..avail_len].copy_from_slice(__input);
13004            Bytes::new(&payload_buf)
13005        } else {
13006            Bytes::new(__input)
13007        };
13008        let mut __struct = Self::default();
13009        __struct.time_boot_ms = buf.get_u32_le();
13010        __struct.lat = buf.get_i32_le();
13011        __struct.lon = buf.get_i32_le();
13012        __struct.alt = buf.get_i32_le();
13013        __struct.relative_alt = buf.get_i32_le();
13014        __struct.vx = buf.get_i16_le();
13015        __struct.vy = buf.get_i16_le();
13016        __struct.vz = buf.get_i16_le();
13017        __struct.hdg = buf.get_u16_le();
13018        Ok(__struct)
13019    }
13020    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13021        let mut __tmp = BytesMut::new(bytes);
13022        #[allow(clippy::absurd_extreme_comparisons)]
13023        #[allow(unused_comparisons)]
13024        if __tmp.remaining() < Self::ENCODED_LEN {
13025            panic!(
13026                "buffer is too small (need {} bytes, but got {})",
13027                Self::ENCODED_LEN,
13028                __tmp.remaining(),
13029            )
13030        }
13031        __tmp.put_u32_le(self.time_boot_ms);
13032        __tmp.put_i32_le(self.lat);
13033        __tmp.put_i32_le(self.lon);
13034        __tmp.put_i32_le(self.alt);
13035        __tmp.put_i32_le(self.relative_alt);
13036        __tmp.put_i16_le(self.vx);
13037        __tmp.put_i16_le(self.vy);
13038        __tmp.put_i16_le(self.vz);
13039        __tmp.put_u16_le(self.hdg);
13040        if matches!(version, MavlinkVersion::V2) {
13041            let len = __tmp.len();
13042            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13043        } else {
13044            __tmp.len()
13045        }
13046    }
13047}
13048#[doc = "id: 63"]
13049#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
13050#[derive(Debug, Clone, PartialEq)]
13051#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13052#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13053pub struct GLOBAL_POSITION_INT_COV_DATA {
13054    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13055    pub time_usec: u64,
13056    #[doc = "Latitude"]
13057    pub lat: i32,
13058    #[doc = "Longitude"]
13059    pub lon: i32,
13060    #[doc = "Altitude in meters above MSL"]
13061    pub alt: i32,
13062    #[doc = "Altitude above ground"]
13063    pub relative_alt: i32,
13064    #[doc = "Ground X Speed (Latitude)"]
13065    pub vx: f32,
13066    #[doc = "Ground Y Speed (Longitude)"]
13067    pub vy: f32,
13068    #[doc = "Ground Z Speed (Altitude)"]
13069    pub vz: f32,
13070    #[doc = "Row-major representation of a 6x6 position and velocity 6x6 cross-covariance matrix (states: lat, lon, alt, vx, vy, vz; first six entries are the first ROW, next six entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
13071    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13072    pub covariance: [f32; 36],
13073    #[doc = "Class id of the estimator this estimate originated from."]
13074    pub estimator_type: MavEstimatorType,
13075}
13076impl GLOBAL_POSITION_INT_COV_DATA {
13077    pub const ENCODED_LEN: usize = 181usize;
13078    pub const DEFAULT: Self = Self {
13079        time_usec: 0_u64,
13080        lat: 0_i32,
13081        lon: 0_i32,
13082        alt: 0_i32,
13083        relative_alt: 0_i32,
13084        vx: 0.0_f32,
13085        vy: 0.0_f32,
13086        vz: 0.0_f32,
13087        covariance: [0.0_f32; 36usize],
13088        estimator_type: MavEstimatorType::DEFAULT,
13089    };
13090    #[cfg(feature = "arbitrary")]
13091    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13092        use arbitrary::{Arbitrary, Unstructured};
13093        let mut buf = [0u8; 1024];
13094        rng.fill_bytes(&mut buf);
13095        let mut unstructured = Unstructured::new(&buf);
13096        Self::arbitrary(&mut unstructured).unwrap_or_default()
13097    }
13098}
13099impl Default for GLOBAL_POSITION_INT_COV_DATA {
13100    fn default() -> Self {
13101        Self::DEFAULT.clone()
13102    }
13103}
13104impl MessageData for GLOBAL_POSITION_INT_COV_DATA {
13105    type Message = MavMessage;
13106    const ID: u32 = 63u32;
13107    const NAME: &'static str = "GLOBAL_POSITION_INT_COV";
13108    const EXTRA_CRC: u8 = 119u8;
13109    const ENCODED_LEN: usize = 181usize;
13110    fn deser(
13111        _version: MavlinkVersion,
13112        __input: &[u8],
13113    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13114        let avail_len = __input.len();
13115        let mut payload_buf = [0; Self::ENCODED_LEN];
13116        let mut buf = if avail_len < Self::ENCODED_LEN {
13117            payload_buf[0..avail_len].copy_from_slice(__input);
13118            Bytes::new(&payload_buf)
13119        } else {
13120            Bytes::new(__input)
13121        };
13122        let mut __struct = Self::default();
13123        __struct.time_usec = buf.get_u64_le();
13124        __struct.lat = buf.get_i32_le();
13125        __struct.lon = buf.get_i32_le();
13126        __struct.alt = buf.get_i32_le();
13127        __struct.relative_alt = buf.get_i32_le();
13128        __struct.vx = buf.get_f32_le();
13129        __struct.vy = buf.get_f32_le();
13130        __struct.vz = buf.get_f32_le();
13131        for v in &mut __struct.covariance {
13132            let val = buf.get_f32_le();
13133            *v = val;
13134        }
13135        let tmp = buf.get_u8();
13136        __struct.estimator_type =
13137            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13138                enum_type: "MavEstimatorType",
13139                value: tmp as u32,
13140            })?;
13141        Ok(__struct)
13142    }
13143    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13144        let mut __tmp = BytesMut::new(bytes);
13145        #[allow(clippy::absurd_extreme_comparisons)]
13146        #[allow(unused_comparisons)]
13147        if __tmp.remaining() < Self::ENCODED_LEN {
13148            panic!(
13149                "buffer is too small (need {} bytes, but got {})",
13150                Self::ENCODED_LEN,
13151                __tmp.remaining(),
13152            )
13153        }
13154        __tmp.put_u64_le(self.time_usec);
13155        __tmp.put_i32_le(self.lat);
13156        __tmp.put_i32_le(self.lon);
13157        __tmp.put_i32_le(self.alt);
13158        __tmp.put_i32_le(self.relative_alt);
13159        __tmp.put_f32_le(self.vx);
13160        __tmp.put_f32_le(self.vy);
13161        __tmp.put_f32_le(self.vz);
13162        for val in &self.covariance {
13163            __tmp.put_f32_le(*val);
13164        }
13165        __tmp.put_u8(self.estimator_type as u8);
13166        if matches!(version, MavlinkVersion::V2) {
13167            let len = __tmp.len();
13168            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13169        } else {
13170            __tmp.len()
13171        }
13172    }
13173}
13174#[doc = "id: 101"]
13175#[doc = "Global position/attitude estimate from a vision source."]
13176#[derive(Debug, Clone, PartialEq)]
13177#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13178#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13179pub struct GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13180    #[doc = "Timestamp (UNIX time or since system boot)"]
13181    pub usec: u64,
13182    #[doc = "Global X position"]
13183    pub x: f32,
13184    #[doc = "Global Y position"]
13185    pub y: f32,
13186    #[doc = "Global Z position"]
13187    pub z: f32,
13188    #[doc = "Roll angle"]
13189    pub roll: f32,
13190    #[doc = "Pitch angle"]
13191    pub pitch: f32,
13192    #[doc = "Yaw angle"]
13193    pub yaw: f32,
13194    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x_global, y_global, z_global, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
13195    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13196    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13197    pub covariance: [f32; 21],
13198    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
13199    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13200    pub reset_counter: u8,
13201}
13202impl GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13203    pub const ENCODED_LEN: usize = 117usize;
13204    pub const DEFAULT: Self = Self {
13205        usec: 0_u64,
13206        x: 0.0_f32,
13207        y: 0.0_f32,
13208        z: 0.0_f32,
13209        roll: 0.0_f32,
13210        pitch: 0.0_f32,
13211        yaw: 0.0_f32,
13212        covariance: [0.0_f32; 21usize],
13213        reset_counter: 0_u8,
13214    };
13215    #[cfg(feature = "arbitrary")]
13216    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13217        use arbitrary::{Arbitrary, Unstructured};
13218        let mut buf = [0u8; 1024];
13219        rng.fill_bytes(&mut buf);
13220        let mut unstructured = Unstructured::new(&buf);
13221        Self::arbitrary(&mut unstructured).unwrap_or_default()
13222    }
13223}
13224impl Default for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13225    fn default() -> Self {
13226        Self::DEFAULT.clone()
13227    }
13228}
13229impl MessageData for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13230    type Message = MavMessage;
13231    const ID: u32 = 101u32;
13232    const NAME: &'static str = "GLOBAL_VISION_POSITION_ESTIMATE";
13233    const EXTRA_CRC: u8 = 102u8;
13234    const ENCODED_LEN: usize = 117usize;
13235    fn deser(
13236        _version: MavlinkVersion,
13237        __input: &[u8],
13238    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13239        let avail_len = __input.len();
13240        let mut payload_buf = [0; Self::ENCODED_LEN];
13241        let mut buf = if avail_len < Self::ENCODED_LEN {
13242            payload_buf[0..avail_len].copy_from_slice(__input);
13243            Bytes::new(&payload_buf)
13244        } else {
13245            Bytes::new(__input)
13246        };
13247        let mut __struct = Self::default();
13248        __struct.usec = buf.get_u64_le();
13249        __struct.x = buf.get_f32_le();
13250        __struct.y = buf.get_f32_le();
13251        __struct.z = buf.get_f32_le();
13252        __struct.roll = buf.get_f32_le();
13253        __struct.pitch = buf.get_f32_le();
13254        __struct.yaw = buf.get_f32_le();
13255        for v in &mut __struct.covariance {
13256            let val = buf.get_f32_le();
13257            *v = val;
13258        }
13259        __struct.reset_counter = buf.get_u8();
13260        Ok(__struct)
13261    }
13262    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13263        let mut __tmp = BytesMut::new(bytes);
13264        #[allow(clippy::absurd_extreme_comparisons)]
13265        #[allow(unused_comparisons)]
13266        if __tmp.remaining() < Self::ENCODED_LEN {
13267            panic!(
13268                "buffer is too small (need {} bytes, but got {})",
13269                Self::ENCODED_LEN,
13270                __tmp.remaining(),
13271            )
13272        }
13273        __tmp.put_u64_le(self.usec);
13274        __tmp.put_f32_le(self.x);
13275        __tmp.put_f32_le(self.y);
13276        __tmp.put_f32_le(self.z);
13277        __tmp.put_f32_le(self.roll);
13278        __tmp.put_f32_le(self.pitch);
13279        __tmp.put_f32_le(self.yaw);
13280        for val in &self.covariance {
13281            __tmp.put_f32_le(*val);
13282        }
13283        __tmp.put_u8(self.reset_counter);
13284        if matches!(version, MavlinkVersion::V2) {
13285            let len = __tmp.len();
13286            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13287        } else {
13288            __tmp.len()
13289        }
13290    }
13291}
13292#[doc = "id: 124"]
13293#[doc = "Second GPS data."]
13294#[derive(Debug, Clone, PartialEq)]
13295#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13296#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13297pub struct GPS2_RAW_DATA {
13298    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13299    pub time_usec: u64,
13300    #[doc = "Latitude (WGS84)"]
13301    pub lat: i32,
13302    #[doc = "Longitude (WGS84)"]
13303    pub lon: i32,
13304    #[doc = "Altitude (MSL). Positive for up."]
13305    pub alt: i32,
13306    #[doc = "Age of DGPS info"]
13307    pub dgps_age: u32,
13308    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
13309    pub eph: u16,
13310    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
13311    pub epv: u16,
13312    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
13313    pub vel: u16,
13314    #[doc = "Course over ground (NOT heading, but direction of movement): 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
13315    pub cog: u16,
13316    #[doc = "GPS fix type."]
13317    pub fix_type: GpsFixType,
13318    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
13319    pub satellites_visible: u8,
13320    #[doc = "Number of DGPS satellites"]
13321    pub dgps_numch: u8,
13322    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
13323    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13324    pub yaw: u16,
13325    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
13326    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13327    pub alt_ellipsoid: i32,
13328    #[doc = "Position uncertainty."]
13329    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13330    pub h_acc: u32,
13331    #[doc = "Altitude uncertainty."]
13332    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13333    pub v_acc: u32,
13334    #[doc = "Speed uncertainty."]
13335    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13336    pub vel_acc: u32,
13337    #[doc = "Heading / track uncertainty"]
13338    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13339    pub hdg_acc: u32,
13340}
13341impl GPS2_RAW_DATA {
13342    pub const ENCODED_LEN: usize = 57usize;
13343    pub const DEFAULT: Self = Self {
13344        time_usec: 0_u64,
13345        lat: 0_i32,
13346        lon: 0_i32,
13347        alt: 0_i32,
13348        dgps_age: 0_u32,
13349        eph: 0_u16,
13350        epv: 0_u16,
13351        vel: 0_u16,
13352        cog: 0_u16,
13353        fix_type: GpsFixType::DEFAULT,
13354        satellites_visible: 0_u8,
13355        dgps_numch: 0_u8,
13356        yaw: 0_u16,
13357        alt_ellipsoid: 0_i32,
13358        h_acc: 0_u32,
13359        v_acc: 0_u32,
13360        vel_acc: 0_u32,
13361        hdg_acc: 0_u32,
13362    };
13363    #[cfg(feature = "arbitrary")]
13364    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13365        use arbitrary::{Arbitrary, Unstructured};
13366        let mut buf = [0u8; 1024];
13367        rng.fill_bytes(&mut buf);
13368        let mut unstructured = Unstructured::new(&buf);
13369        Self::arbitrary(&mut unstructured).unwrap_or_default()
13370    }
13371}
13372impl Default for GPS2_RAW_DATA {
13373    fn default() -> Self {
13374        Self::DEFAULT.clone()
13375    }
13376}
13377impl MessageData for GPS2_RAW_DATA {
13378    type Message = MavMessage;
13379    const ID: u32 = 124u32;
13380    const NAME: &'static str = "GPS2_RAW";
13381    const EXTRA_CRC: u8 = 87u8;
13382    const ENCODED_LEN: usize = 57usize;
13383    fn deser(
13384        _version: MavlinkVersion,
13385        __input: &[u8],
13386    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13387        let avail_len = __input.len();
13388        let mut payload_buf = [0; Self::ENCODED_LEN];
13389        let mut buf = if avail_len < Self::ENCODED_LEN {
13390            payload_buf[0..avail_len].copy_from_slice(__input);
13391            Bytes::new(&payload_buf)
13392        } else {
13393            Bytes::new(__input)
13394        };
13395        let mut __struct = Self::default();
13396        __struct.time_usec = buf.get_u64_le();
13397        __struct.lat = buf.get_i32_le();
13398        __struct.lon = buf.get_i32_le();
13399        __struct.alt = buf.get_i32_le();
13400        __struct.dgps_age = buf.get_u32_le();
13401        __struct.eph = buf.get_u16_le();
13402        __struct.epv = buf.get_u16_le();
13403        __struct.vel = buf.get_u16_le();
13404        __struct.cog = buf.get_u16_le();
13405        let tmp = buf.get_u8();
13406        __struct.fix_type =
13407            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13408                enum_type: "GpsFixType",
13409                value: tmp as u32,
13410            })?;
13411        __struct.satellites_visible = buf.get_u8();
13412        __struct.dgps_numch = buf.get_u8();
13413        __struct.yaw = buf.get_u16_le();
13414        __struct.alt_ellipsoid = buf.get_i32_le();
13415        __struct.h_acc = buf.get_u32_le();
13416        __struct.v_acc = buf.get_u32_le();
13417        __struct.vel_acc = buf.get_u32_le();
13418        __struct.hdg_acc = buf.get_u32_le();
13419        Ok(__struct)
13420    }
13421    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13422        let mut __tmp = BytesMut::new(bytes);
13423        #[allow(clippy::absurd_extreme_comparisons)]
13424        #[allow(unused_comparisons)]
13425        if __tmp.remaining() < Self::ENCODED_LEN {
13426            panic!(
13427                "buffer is too small (need {} bytes, but got {})",
13428                Self::ENCODED_LEN,
13429                __tmp.remaining(),
13430            )
13431        }
13432        __tmp.put_u64_le(self.time_usec);
13433        __tmp.put_i32_le(self.lat);
13434        __tmp.put_i32_le(self.lon);
13435        __tmp.put_i32_le(self.alt);
13436        __tmp.put_u32_le(self.dgps_age);
13437        __tmp.put_u16_le(self.eph);
13438        __tmp.put_u16_le(self.epv);
13439        __tmp.put_u16_le(self.vel);
13440        __tmp.put_u16_le(self.cog);
13441        __tmp.put_u8(self.fix_type as u8);
13442        __tmp.put_u8(self.satellites_visible);
13443        __tmp.put_u8(self.dgps_numch);
13444        __tmp.put_u16_le(self.yaw);
13445        __tmp.put_i32_le(self.alt_ellipsoid);
13446        __tmp.put_u32_le(self.h_acc);
13447        __tmp.put_u32_le(self.v_acc);
13448        __tmp.put_u32_le(self.vel_acc);
13449        __tmp.put_u32_le(self.hdg_acc);
13450        if matches!(version, MavlinkVersion::V2) {
13451            let len = __tmp.len();
13452            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13453        } else {
13454            __tmp.len()
13455        }
13456    }
13457}
13458#[doc = "id: 128"]
13459#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
13460#[derive(Debug, Clone, PartialEq)]
13461#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13462#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13463pub struct GPS2_RTK_DATA {
13464    #[doc = "Time since boot of last baseline message received."]
13465    pub time_last_baseline_ms: u32,
13466    #[doc = "GPS Time of Week of last baseline"]
13467    pub tow: u32,
13468    #[doc = "Current baseline in ECEF x or NED north component."]
13469    pub baseline_a_mm: i32,
13470    #[doc = "Current baseline in ECEF y or NED east component."]
13471    pub baseline_b_mm: i32,
13472    #[doc = "Current baseline in ECEF z or NED down component."]
13473    pub baseline_c_mm: i32,
13474    #[doc = "Current estimate of baseline accuracy."]
13475    pub accuracy: u32,
13476    #[doc = "Current number of integer ambiguity hypotheses."]
13477    pub iar_num_hypotheses: i32,
13478    #[doc = "GPS Week Number of last baseline"]
13479    pub wn: u16,
13480    #[doc = "Identification of connected RTK receiver."]
13481    pub rtk_receiver_id: u8,
13482    #[doc = "GPS-specific health report for RTK data."]
13483    pub rtk_health: u8,
13484    #[doc = "Rate of baseline messages being received by GPS"]
13485    pub rtk_rate: u8,
13486    #[doc = "Current number of sats used for RTK calculation."]
13487    pub nsats: u8,
13488    #[doc = "Coordinate system of baseline"]
13489    pub baseline_coords_type: RtkBaselineCoordinateSystem,
13490}
13491impl GPS2_RTK_DATA {
13492    pub const ENCODED_LEN: usize = 35usize;
13493    pub const DEFAULT: Self = Self {
13494        time_last_baseline_ms: 0_u32,
13495        tow: 0_u32,
13496        baseline_a_mm: 0_i32,
13497        baseline_b_mm: 0_i32,
13498        baseline_c_mm: 0_i32,
13499        accuracy: 0_u32,
13500        iar_num_hypotheses: 0_i32,
13501        wn: 0_u16,
13502        rtk_receiver_id: 0_u8,
13503        rtk_health: 0_u8,
13504        rtk_rate: 0_u8,
13505        nsats: 0_u8,
13506        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
13507    };
13508    #[cfg(feature = "arbitrary")]
13509    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13510        use arbitrary::{Arbitrary, Unstructured};
13511        let mut buf = [0u8; 1024];
13512        rng.fill_bytes(&mut buf);
13513        let mut unstructured = Unstructured::new(&buf);
13514        Self::arbitrary(&mut unstructured).unwrap_or_default()
13515    }
13516}
13517impl Default for GPS2_RTK_DATA {
13518    fn default() -> Self {
13519        Self::DEFAULT.clone()
13520    }
13521}
13522impl MessageData for GPS2_RTK_DATA {
13523    type Message = MavMessage;
13524    const ID: u32 = 128u32;
13525    const NAME: &'static str = "GPS2_RTK";
13526    const EXTRA_CRC: u8 = 226u8;
13527    const ENCODED_LEN: usize = 35usize;
13528    fn deser(
13529        _version: MavlinkVersion,
13530        __input: &[u8],
13531    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13532        let avail_len = __input.len();
13533        let mut payload_buf = [0; Self::ENCODED_LEN];
13534        let mut buf = if avail_len < Self::ENCODED_LEN {
13535            payload_buf[0..avail_len].copy_from_slice(__input);
13536            Bytes::new(&payload_buf)
13537        } else {
13538            Bytes::new(__input)
13539        };
13540        let mut __struct = Self::default();
13541        __struct.time_last_baseline_ms = buf.get_u32_le();
13542        __struct.tow = buf.get_u32_le();
13543        __struct.baseline_a_mm = buf.get_i32_le();
13544        __struct.baseline_b_mm = buf.get_i32_le();
13545        __struct.baseline_c_mm = buf.get_i32_le();
13546        __struct.accuracy = buf.get_u32_le();
13547        __struct.iar_num_hypotheses = buf.get_i32_le();
13548        __struct.wn = buf.get_u16_le();
13549        __struct.rtk_receiver_id = buf.get_u8();
13550        __struct.rtk_health = buf.get_u8();
13551        __struct.rtk_rate = buf.get_u8();
13552        __struct.nsats = buf.get_u8();
13553        let tmp = buf.get_u8();
13554        __struct.baseline_coords_type =
13555            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13556                enum_type: "RtkBaselineCoordinateSystem",
13557                value: tmp as u32,
13558            })?;
13559        Ok(__struct)
13560    }
13561    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13562        let mut __tmp = BytesMut::new(bytes);
13563        #[allow(clippy::absurd_extreme_comparisons)]
13564        #[allow(unused_comparisons)]
13565        if __tmp.remaining() < Self::ENCODED_LEN {
13566            panic!(
13567                "buffer is too small (need {} bytes, but got {})",
13568                Self::ENCODED_LEN,
13569                __tmp.remaining(),
13570            )
13571        }
13572        __tmp.put_u32_le(self.time_last_baseline_ms);
13573        __tmp.put_u32_le(self.tow);
13574        __tmp.put_i32_le(self.baseline_a_mm);
13575        __tmp.put_i32_le(self.baseline_b_mm);
13576        __tmp.put_i32_le(self.baseline_c_mm);
13577        __tmp.put_u32_le(self.accuracy);
13578        __tmp.put_i32_le(self.iar_num_hypotheses);
13579        __tmp.put_u16_le(self.wn);
13580        __tmp.put_u8(self.rtk_receiver_id);
13581        __tmp.put_u8(self.rtk_health);
13582        __tmp.put_u8(self.rtk_rate);
13583        __tmp.put_u8(self.nsats);
13584        __tmp.put_u8(self.baseline_coords_type as u8);
13585        if matches!(version, MavlinkVersion::V2) {
13586            let len = __tmp.len();
13587            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13588        } else {
13589            __tmp.len()
13590        }
13591    }
13592}
13593#[doc = "id: 49"]
13594#[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
13595#[derive(Debug, Clone, PartialEq)]
13596#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13597#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13598pub struct GPS_GLOBAL_ORIGIN_DATA {
13599    #[doc = "Latitude (WGS84)"]
13600    pub latitude: i32,
13601    #[doc = "Longitude (WGS84)"]
13602    pub longitude: i32,
13603    #[doc = "Altitude (MSL). Positive for up."]
13604    pub altitude: i32,
13605    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13606    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13607    pub time_usec: u64,
13608}
13609impl GPS_GLOBAL_ORIGIN_DATA {
13610    pub const ENCODED_LEN: usize = 20usize;
13611    pub const DEFAULT: Self = Self {
13612        latitude: 0_i32,
13613        longitude: 0_i32,
13614        altitude: 0_i32,
13615        time_usec: 0_u64,
13616    };
13617    #[cfg(feature = "arbitrary")]
13618    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13619        use arbitrary::{Arbitrary, Unstructured};
13620        let mut buf = [0u8; 1024];
13621        rng.fill_bytes(&mut buf);
13622        let mut unstructured = Unstructured::new(&buf);
13623        Self::arbitrary(&mut unstructured).unwrap_or_default()
13624    }
13625}
13626impl Default for GPS_GLOBAL_ORIGIN_DATA {
13627    fn default() -> Self {
13628        Self::DEFAULT.clone()
13629    }
13630}
13631impl MessageData for GPS_GLOBAL_ORIGIN_DATA {
13632    type Message = MavMessage;
13633    const ID: u32 = 49u32;
13634    const NAME: &'static str = "GPS_GLOBAL_ORIGIN";
13635    const EXTRA_CRC: u8 = 39u8;
13636    const ENCODED_LEN: usize = 20usize;
13637    fn deser(
13638        _version: MavlinkVersion,
13639        __input: &[u8],
13640    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13641        let avail_len = __input.len();
13642        let mut payload_buf = [0; Self::ENCODED_LEN];
13643        let mut buf = if avail_len < Self::ENCODED_LEN {
13644            payload_buf[0..avail_len].copy_from_slice(__input);
13645            Bytes::new(&payload_buf)
13646        } else {
13647            Bytes::new(__input)
13648        };
13649        let mut __struct = Self::default();
13650        __struct.latitude = buf.get_i32_le();
13651        __struct.longitude = buf.get_i32_le();
13652        __struct.altitude = buf.get_i32_le();
13653        __struct.time_usec = buf.get_u64_le();
13654        Ok(__struct)
13655    }
13656    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13657        let mut __tmp = BytesMut::new(bytes);
13658        #[allow(clippy::absurd_extreme_comparisons)]
13659        #[allow(unused_comparisons)]
13660        if __tmp.remaining() < Self::ENCODED_LEN {
13661            panic!(
13662                "buffer is too small (need {} bytes, but got {})",
13663                Self::ENCODED_LEN,
13664                __tmp.remaining(),
13665            )
13666        }
13667        __tmp.put_i32_le(self.latitude);
13668        __tmp.put_i32_le(self.longitude);
13669        __tmp.put_i32_le(self.altitude);
13670        __tmp.put_u64_le(self.time_usec);
13671        if matches!(version, MavlinkVersion::V2) {
13672            let len = __tmp.len();
13673            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13674        } else {
13675            __tmp.len()
13676        }
13677    }
13678}
13679#[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
13680#[doc = "id: 123"]
13681#[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
13682#[derive(Debug, Clone, PartialEq)]
13683#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13684#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13685pub struct GPS_INJECT_DATA_DATA {
13686    #[doc = "System ID"]
13687    pub target_system: u8,
13688    #[doc = "Component ID"]
13689    pub target_component: u8,
13690    #[doc = "Data length"]
13691    pub len: u8,
13692    #[doc = "Raw data (110 is enough for 12 satellites of RTCMv2)"]
13693    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13694    pub data: [u8; 110],
13695}
13696impl GPS_INJECT_DATA_DATA {
13697    pub const ENCODED_LEN: usize = 113usize;
13698    pub const DEFAULT: Self = Self {
13699        target_system: 0_u8,
13700        target_component: 0_u8,
13701        len: 0_u8,
13702        data: [0_u8; 110usize],
13703    };
13704    #[cfg(feature = "arbitrary")]
13705    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13706        use arbitrary::{Arbitrary, Unstructured};
13707        let mut buf = [0u8; 1024];
13708        rng.fill_bytes(&mut buf);
13709        let mut unstructured = Unstructured::new(&buf);
13710        Self::arbitrary(&mut unstructured).unwrap_or_default()
13711    }
13712}
13713impl Default for GPS_INJECT_DATA_DATA {
13714    fn default() -> Self {
13715        Self::DEFAULT.clone()
13716    }
13717}
13718impl MessageData for GPS_INJECT_DATA_DATA {
13719    type Message = MavMessage;
13720    const ID: u32 = 123u32;
13721    const NAME: &'static str = "GPS_INJECT_DATA";
13722    const EXTRA_CRC: u8 = 250u8;
13723    const ENCODED_LEN: usize = 113usize;
13724    fn deser(
13725        _version: MavlinkVersion,
13726        __input: &[u8],
13727    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13728        let avail_len = __input.len();
13729        let mut payload_buf = [0; Self::ENCODED_LEN];
13730        let mut buf = if avail_len < Self::ENCODED_LEN {
13731            payload_buf[0..avail_len].copy_from_slice(__input);
13732            Bytes::new(&payload_buf)
13733        } else {
13734            Bytes::new(__input)
13735        };
13736        let mut __struct = Self::default();
13737        __struct.target_system = buf.get_u8();
13738        __struct.target_component = buf.get_u8();
13739        __struct.len = buf.get_u8();
13740        for v in &mut __struct.data {
13741            let val = buf.get_u8();
13742            *v = val;
13743        }
13744        Ok(__struct)
13745    }
13746    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13747        let mut __tmp = BytesMut::new(bytes);
13748        #[allow(clippy::absurd_extreme_comparisons)]
13749        #[allow(unused_comparisons)]
13750        if __tmp.remaining() < Self::ENCODED_LEN {
13751            panic!(
13752                "buffer is too small (need {} bytes, but got {})",
13753                Self::ENCODED_LEN,
13754                __tmp.remaining(),
13755            )
13756        }
13757        __tmp.put_u8(self.target_system);
13758        __tmp.put_u8(self.target_component);
13759        __tmp.put_u8(self.len);
13760        for val in &self.data {
13761            __tmp.put_u8(*val);
13762        }
13763        if matches!(version, MavlinkVersion::V2) {
13764            let len = __tmp.len();
13765            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13766        } else {
13767            __tmp.len()
13768        }
13769    }
13770}
13771#[doc = "id: 232"]
13772#[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
13773#[derive(Debug, Clone, PartialEq)]
13774#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13775#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13776pub struct GPS_INPUT_DATA {
13777    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13778    pub time_usec: u64,
13779    #[doc = "GPS time (from start of GPS week)"]
13780    pub time_week_ms: u32,
13781    #[doc = "Latitude (WGS84)"]
13782    pub lat: i32,
13783    #[doc = "Longitude (WGS84)"]
13784    pub lon: i32,
13785    #[doc = "Altitude (MSL). Positive for up."]
13786    pub alt: f32,
13787    #[doc = "GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX"]
13788    pub hdop: f32,
13789    #[doc = "GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX"]
13790    pub vdop: f32,
13791    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
13792    pub vn: f32,
13793    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
13794    pub ve: f32,
13795    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
13796    pub vd: f32,
13797    #[doc = "GPS speed accuracy"]
13798    pub speed_accuracy: f32,
13799    #[doc = "GPS horizontal accuracy"]
13800    pub horiz_accuracy: f32,
13801    #[doc = "GPS vertical accuracy"]
13802    pub vert_accuracy: f32,
13803    #[doc = "Bitmap indicating which GPS input flags fields to ignore.  All other fields must be provided."]
13804    pub ignore_flags: GpsInputIgnoreFlags,
13805    #[doc = "GPS week number"]
13806    pub time_week: u16,
13807    #[doc = "ID of the GPS for multiple GPS inputs"]
13808    pub gps_id: u8,
13809    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. 4: 3D with DGPS. 5: 3D with RTK"]
13810    pub fix_type: u8,
13811    #[doc = "Number of satellites visible."]
13812    pub satellites_visible: u8,
13813    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
13814    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13815    pub yaw: u16,
13816}
13817impl GPS_INPUT_DATA {
13818    pub const ENCODED_LEN: usize = 65usize;
13819    pub const DEFAULT: Self = Self {
13820        time_usec: 0_u64,
13821        time_week_ms: 0_u32,
13822        lat: 0_i32,
13823        lon: 0_i32,
13824        alt: 0.0_f32,
13825        hdop: 0.0_f32,
13826        vdop: 0.0_f32,
13827        vn: 0.0_f32,
13828        ve: 0.0_f32,
13829        vd: 0.0_f32,
13830        speed_accuracy: 0.0_f32,
13831        horiz_accuracy: 0.0_f32,
13832        vert_accuracy: 0.0_f32,
13833        ignore_flags: GpsInputIgnoreFlags::DEFAULT,
13834        time_week: 0_u16,
13835        gps_id: 0_u8,
13836        fix_type: 0_u8,
13837        satellites_visible: 0_u8,
13838        yaw: 0_u16,
13839    };
13840    #[cfg(feature = "arbitrary")]
13841    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13842        use arbitrary::{Arbitrary, Unstructured};
13843        let mut buf = [0u8; 1024];
13844        rng.fill_bytes(&mut buf);
13845        let mut unstructured = Unstructured::new(&buf);
13846        Self::arbitrary(&mut unstructured).unwrap_or_default()
13847    }
13848}
13849impl Default for GPS_INPUT_DATA {
13850    fn default() -> Self {
13851        Self::DEFAULT.clone()
13852    }
13853}
13854impl MessageData for GPS_INPUT_DATA {
13855    type Message = MavMessage;
13856    const ID: u32 = 232u32;
13857    const NAME: &'static str = "GPS_INPUT";
13858    const EXTRA_CRC: u8 = 151u8;
13859    const ENCODED_LEN: usize = 65usize;
13860    fn deser(
13861        _version: MavlinkVersion,
13862        __input: &[u8],
13863    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13864        let avail_len = __input.len();
13865        let mut payload_buf = [0; Self::ENCODED_LEN];
13866        let mut buf = if avail_len < Self::ENCODED_LEN {
13867            payload_buf[0..avail_len].copy_from_slice(__input);
13868            Bytes::new(&payload_buf)
13869        } else {
13870            Bytes::new(__input)
13871        };
13872        let mut __struct = Self::default();
13873        __struct.time_usec = buf.get_u64_le();
13874        __struct.time_week_ms = buf.get_u32_le();
13875        __struct.lat = buf.get_i32_le();
13876        __struct.lon = buf.get_i32_le();
13877        __struct.alt = buf.get_f32_le();
13878        __struct.hdop = buf.get_f32_le();
13879        __struct.vdop = buf.get_f32_le();
13880        __struct.vn = buf.get_f32_le();
13881        __struct.ve = buf.get_f32_le();
13882        __struct.vd = buf.get_f32_le();
13883        __struct.speed_accuracy = buf.get_f32_le();
13884        __struct.horiz_accuracy = buf.get_f32_le();
13885        __struct.vert_accuracy = buf.get_f32_le();
13886        let tmp = buf.get_u16_le();
13887        __struct.ignore_flags = GpsInputIgnoreFlags::from_bits(
13888            tmp & GpsInputIgnoreFlags::all().bits(),
13889        )
13890        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13891            flag_type: "GpsInputIgnoreFlags",
13892            value: tmp as u32,
13893        })?;
13894        __struct.time_week = buf.get_u16_le();
13895        __struct.gps_id = buf.get_u8();
13896        __struct.fix_type = buf.get_u8();
13897        __struct.satellites_visible = buf.get_u8();
13898        __struct.yaw = buf.get_u16_le();
13899        Ok(__struct)
13900    }
13901    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13902        let mut __tmp = BytesMut::new(bytes);
13903        #[allow(clippy::absurd_extreme_comparisons)]
13904        #[allow(unused_comparisons)]
13905        if __tmp.remaining() < Self::ENCODED_LEN {
13906            panic!(
13907                "buffer is too small (need {} bytes, but got {})",
13908                Self::ENCODED_LEN,
13909                __tmp.remaining(),
13910            )
13911        }
13912        __tmp.put_u64_le(self.time_usec);
13913        __tmp.put_u32_le(self.time_week_ms);
13914        __tmp.put_i32_le(self.lat);
13915        __tmp.put_i32_le(self.lon);
13916        __tmp.put_f32_le(self.alt);
13917        __tmp.put_f32_le(self.hdop);
13918        __tmp.put_f32_le(self.vdop);
13919        __tmp.put_f32_le(self.vn);
13920        __tmp.put_f32_le(self.ve);
13921        __tmp.put_f32_le(self.vd);
13922        __tmp.put_f32_le(self.speed_accuracy);
13923        __tmp.put_f32_le(self.horiz_accuracy);
13924        __tmp.put_f32_le(self.vert_accuracy);
13925        __tmp.put_u16_le(self.ignore_flags.bits());
13926        __tmp.put_u16_le(self.time_week);
13927        __tmp.put_u8(self.gps_id);
13928        __tmp.put_u8(self.fix_type);
13929        __tmp.put_u8(self.satellites_visible);
13930        __tmp.put_u16_le(self.yaw);
13931        if matches!(version, MavlinkVersion::V2) {
13932            let len = __tmp.len();
13933            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13934        } else {
13935            __tmp.len()
13936        }
13937    }
13938}
13939#[doc = "id: 24"]
13940#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
13941#[derive(Debug, Clone, PartialEq)]
13942#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13943#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13944pub struct GPS_RAW_INT_DATA {
13945    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13946    pub time_usec: u64,
13947    #[doc = "Latitude (WGS84, EGM96 ellipsoid)"]
13948    pub lat: i32,
13949    #[doc = "Longitude (WGS84, EGM96 ellipsoid)"]
13950    pub lon: i32,
13951    #[doc = "Altitude (MSL). Positive for up. Note that virtually all GPS modules provide the MSL altitude in addition to the WGS84 altitude."]
13952    pub alt: i32,
13953    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
13954    pub eph: u16,
13955    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
13956    pub epv: u16,
13957    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
13958    pub vel: u16,
13959    #[doc = "Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
13960    pub cog: u16,
13961    #[doc = "GPS fix type."]
13962    pub fix_type: GpsFixType,
13963    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
13964    pub satellites_visible: u8,
13965    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
13966    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13967    pub alt_ellipsoid: i32,
13968    #[doc = "Position uncertainty."]
13969    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13970    pub h_acc: u32,
13971    #[doc = "Altitude uncertainty."]
13972    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13973    pub v_acc: u32,
13974    #[doc = "Speed uncertainty."]
13975    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13976    pub vel_acc: u32,
13977    #[doc = "Heading / track uncertainty"]
13978    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13979    pub hdg_acc: u32,
13980    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
13981    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13982    pub yaw: u16,
13983}
13984impl GPS_RAW_INT_DATA {
13985    pub const ENCODED_LEN: usize = 52usize;
13986    pub const DEFAULT: Self = Self {
13987        time_usec: 0_u64,
13988        lat: 0_i32,
13989        lon: 0_i32,
13990        alt: 0_i32,
13991        eph: 0_u16,
13992        epv: 0_u16,
13993        vel: 0_u16,
13994        cog: 0_u16,
13995        fix_type: GpsFixType::DEFAULT,
13996        satellites_visible: 0_u8,
13997        alt_ellipsoid: 0_i32,
13998        h_acc: 0_u32,
13999        v_acc: 0_u32,
14000        vel_acc: 0_u32,
14001        hdg_acc: 0_u32,
14002        yaw: 0_u16,
14003    };
14004    #[cfg(feature = "arbitrary")]
14005    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14006        use arbitrary::{Arbitrary, Unstructured};
14007        let mut buf = [0u8; 1024];
14008        rng.fill_bytes(&mut buf);
14009        let mut unstructured = Unstructured::new(&buf);
14010        Self::arbitrary(&mut unstructured).unwrap_or_default()
14011    }
14012}
14013impl Default for GPS_RAW_INT_DATA {
14014    fn default() -> Self {
14015        Self::DEFAULT.clone()
14016    }
14017}
14018impl MessageData for GPS_RAW_INT_DATA {
14019    type Message = MavMessage;
14020    const ID: u32 = 24u32;
14021    const NAME: &'static str = "GPS_RAW_INT";
14022    const EXTRA_CRC: u8 = 24u8;
14023    const ENCODED_LEN: usize = 52usize;
14024    fn deser(
14025        _version: MavlinkVersion,
14026        __input: &[u8],
14027    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14028        let avail_len = __input.len();
14029        let mut payload_buf = [0; Self::ENCODED_LEN];
14030        let mut buf = if avail_len < Self::ENCODED_LEN {
14031            payload_buf[0..avail_len].copy_from_slice(__input);
14032            Bytes::new(&payload_buf)
14033        } else {
14034            Bytes::new(__input)
14035        };
14036        let mut __struct = Self::default();
14037        __struct.time_usec = buf.get_u64_le();
14038        __struct.lat = buf.get_i32_le();
14039        __struct.lon = buf.get_i32_le();
14040        __struct.alt = buf.get_i32_le();
14041        __struct.eph = buf.get_u16_le();
14042        __struct.epv = buf.get_u16_le();
14043        __struct.vel = buf.get_u16_le();
14044        __struct.cog = buf.get_u16_le();
14045        let tmp = buf.get_u8();
14046        __struct.fix_type =
14047            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14048                enum_type: "GpsFixType",
14049                value: tmp as u32,
14050            })?;
14051        __struct.satellites_visible = buf.get_u8();
14052        __struct.alt_ellipsoid = buf.get_i32_le();
14053        __struct.h_acc = buf.get_u32_le();
14054        __struct.v_acc = buf.get_u32_le();
14055        __struct.vel_acc = buf.get_u32_le();
14056        __struct.hdg_acc = buf.get_u32_le();
14057        __struct.yaw = buf.get_u16_le();
14058        Ok(__struct)
14059    }
14060    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14061        let mut __tmp = BytesMut::new(bytes);
14062        #[allow(clippy::absurd_extreme_comparisons)]
14063        #[allow(unused_comparisons)]
14064        if __tmp.remaining() < Self::ENCODED_LEN {
14065            panic!(
14066                "buffer is too small (need {} bytes, but got {})",
14067                Self::ENCODED_LEN,
14068                __tmp.remaining(),
14069            )
14070        }
14071        __tmp.put_u64_le(self.time_usec);
14072        __tmp.put_i32_le(self.lat);
14073        __tmp.put_i32_le(self.lon);
14074        __tmp.put_i32_le(self.alt);
14075        __tmp.put_u16_le(self.eph);
14076        __tmp.put_u16_le(self.epv);
14077        __tmp.put_u16_le(self.vel);
14078        __tmp.put_u16_le(self.cog);
14079        __tmp.put_u8(self.fix_type as u8);
14080        __tmp.put_u8(self.satellites_visible);
14081        __tmp.put_i32_le(self.alt_ellipsoid);
14082        __tmp.put_u32_le(self.h_acc);
14083        __tmp.put_u32_le(self.v_acc);
14084        __tmp.put_u32_le(self.vel_acc);
14085        __tmp.put_u32_le(self.hdg_acc);
14086        __tmp.put_u16_le(self.yaw);
14087        if matches!(version, MavlinkVersion::V2) {
14088            let len = __tmp.len();
14089            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14090        } else {
14091            __tmp.len()
14092        }
14093    }
14094}
14095#[doc = "id: 233"]
14096#[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
14097#[derive(Debug, Clone, PartialEq)]
14098#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14099#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14100pub struct GPS_RTCM_DATA_DATA {
14101    #[doc = "LSB: 1 means message is fragmented, next 2 bits are the fragment ID, the remaining 5 bits are used for the sequence ID. Messages are only to be flushed to the GPS when the entire message has been reconstructed on the autopilot. The fragment ID specifies which order the fragments should be assembled into a buffer, while the sequence ID is used to detect a mismatch between different buffers. The buffer is considered fully reconstructed when either all 4 fragments are present, or all the fragments before the first fragment with a non full payload is received. This management is used to ensure that normal GPS operation doesn't corrupt RTCM data, and to recover from a unreliable transport delivery order."]
14102    pub flags: u8,
14103    #[doc = "data length"]
14104    pub len: u8,
14105    #[doc = "RTCM message (may be fragmented)"]
14106    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14107    pub data: [u8; 180],
14108}
14109impl GPS_RTCM_DATA_DATA {
14110    pub const ENCODED_LEN: usize = 182usize;
14111    pub const DEFAULT: Self = Self {
14112        flags: 0_u8,
14113        len: 0_u8,
14114        data: [0_u8; 180usize],
14115    };
14116    #[cfg(feature = "arbitrary")]
14117    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14118        use arbitrary::{Arbitrary, Unstructured};
14119        let mut buf = [0u8; 1024];
14120        rng.fill_bytes(&mut buf);
14121        let mut unstructured = Unstructured::new(&buf);
14122        Self::arbitrary(&mut unstructured).unwrap_or_default()
14123    }
14124}
14125impl Default for GPS_RTCM_DATA_DATA {
14126    fn default() -> Self {
14127        Self::DEFAULT.clone()
14128    }
14129}
14130impl MessageData for GPS_RTCM_DATA_DATA {
14131    type Message = MavMessage;
14132    const ID: u32 = 233u32;
14133    const NAME: &'static str = "GPS_RTCM_DATA";
14134    const EXTRA_CRC: u8 = 35u8;
14135    const ENCODED_LEN: usize = 182usize;
14136    fn deser(
14137        _version: MavlinkVersion,
14138        __input: &[u8],
14139    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14140        let avail_len = __input.len();
14141        let mut payload_buf = [0; Self::ENCODED_LEN];
14142        let mut buf = if avail_len < Self::ENCODED_LEN {
14143            payload_buf[0..avail_len].copy_from_slice(__input);
14144            Bytes::new(&payload_buf)
14145        } else {
14146            Bytes::new(__input)
14147        };
14148        let mut __struct = Self::default();
14149        __struct.flags = buf.get_u8();
14150        __struct.len = buf.get_u8();
14151        for v in &mut __struct.data {
14152            let val = buf.get_u8();
14153            *v = val;
14154        }
14155        Ok(__struct)
14156    }
14157    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14158        let mut __tmp = BytesMut::new(bytes);
14159        #[allow(clippy::absurd_extreme_comparisons)]
14160        #[allow(unused_comparisons)]
14161        if __tmp.remaining() < Self::ENCODED_LEN {
14162            panic!(
14163                "buffer is too small (need {} bytes, but got {})",
14164                Self::ENCODED_LEN,
14165                __tmp.remaining(),
14166            )
14167        }
14168        __tmp.put_u8(self.flags);
14169        __tmp.put_u8(self.len);
14170        for val in &self.data {
14171            __tmp.put_u8(*val);
14172        }
14173        if matches!(version, MavlinkVersion::V2) {
14174            let len = __tmp.len();
14175            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14176        } else {
14177            __tmp.len()
14178        }
14179    }
14180}
14181#[doc = "id: 127"]
14182#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
14183#[derive(Debug, Clone, PartialEq)]
14184#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14185#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14186pub struct GPS_RTK_DATA {
14187    #[doc = "Time since boot of last baseline message received."]
14188    pub time_last_baseline_ms: u32,
14189    #[doc = "GPS Time of Week of last baseline"]
14190    pub tow: u32,
14191    #[doc = "Current baseline in ECEF x or NED north component."]
14192    pub baseline_a_mm: i32,
14193    #[doc = "Current baseline in ECEF y or NED east component."]
14194    pub baseline_b_mm: i32,
14195    #[doc = "Current baseline in ECEF z or NED down component."]
14196    pub baseline_c_mm: i32,
14197    #[doc = "Current estimate of baseline accuracy."]
14198    pub accuracy: u32,
14199    #[doc = "Current number of integer ambiguity hypotheses."]
14200    pub iar_num_hypotheses: i32,
14201    #[doc = "GPS Week Number of last baseline"]
14202    pub wn: u16,
14203    #[doc = "Identification of connected RTK receiver."]
14204    pub rtk_receiver_id: u8,
14205    #[doc = "GPS-specific health report for RTK data."]
14206    pub rtk_health: u8,
14207    #[doc = "Rate of baseline messages being received by GPS"]
14208    pub rtk_rate: u8,
14209    #[doc = "Current number of sats used for RTK calculation."]
14210    pub nsats: u8,
14211    #[doc = "Coordinate system of baseline"]
14212    pub baseline_coords_type: RtkBaselineCoordinateSystem,
14213}
14214impl GPS_RTK_DATA {
14215    pub const ENCODED_LEN: usize = 35usize;
14216    pub const DEFAULT: Self = Self {
14217        time_last_baseline_ms: 0_u32,
14218        tow: 0_u32,
14219        baseline_a_mm: 0_i32,
14220        baseline_b_mm: 0_i32,
14221        baseline_c_mm: 0_i32,
14222        accuracy: 0_u32,
14223        iar_num_hypotheses: 0_i32,
14224        wn: 0_u16,
14225        rtk_receiver_id: 0_u8,
14226        rtk_health: 0_u8,
14227        rtk_rate: 0_u8,
14228        nsats: 0_u8,
14229        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
14230    };
14231    #[cfg(feature = "arbitrary")]
14232    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14233        use arbitrary::{Arbitrary, Unstructured};
14234        let mut buf = [0u8; 1024];
14235        rng.fill_bytes(&mut buf);
14236        let mut unstructured = Unstructured::new(&buf);
14237        Self::arbitrary(&mut unstructured).unwrap_or_default()
14238    }
14239}
14240impl Default for GPS_RTK_DATA {
14241    fn default() -> Self {
14242        Self::DEFAULT.clone()
14243    }
14244}
14245impl MessageData for GPS_RTK_DATA {
14246    type Message = MavMessage;
14247    const ID: u32 = 127u32;
14248    const NAME: &'static str = "GPS_RTK";
14249    const EXTRA_CRC: u8 = 25u8;
14250    const ENCODED_LEN: usize = 35usize;
14251    fn deser(
14252        _version: MavlinkVersion,
14253        __input: &[u8],
14254    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14255        let avail_len = __input.len();
14256        let mut payload_buf = [0; Self::ENCODED_LEN];
14257        let mut buf = if avail_len < Self::ENCODED_LEN {
14258            payload_buf[0..avail_len].copy_from_slice(__input);
14259            Bytes::new(&payload_buf)
14260        } else {
14261            Bytes::new(__input)
14262        };
14263        let mut __struct = Self::default();
14264        __struct.time_last_baseline_ms = buf.get_u32_le();
14265        __struct.tow = buf.get_u32_le();
14266        __struct.baseline_a_mm = buf.get_i32_le();
14267        __struct.baseline_b_mm = buf.get_i32_le();
14268        __struct.baseline_c_mm = buf.get_i32_le();
14269        __struct.accuracy = buf.get_u32_le();
14270        __struct.iar_num_hypotheses = buf.get_i32_le();
14271        __struct.wn = buf.get_u16_le();
14272        __struct.rtk_receiver_id = buf.get_u8();
14273        __struct.rtk_health = buf.get_u8();
14274        __struct.rtk_rate = buf.get_u8();
14275        __struct.nsats = buf.get_u8();
14276        let tmp = buf.get_u8();
14277        __struct.baseline_coords_type =
14278            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14279                enum_type: "RtkBaselineCoordinateSystem",
14280                value: tmp as u32,
14281            })?;
14282        Ok(__struct)
14283    }
14284    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14285        let mut __tmp = BytesMut::new(bytes);
14286        #[allow(clippy::absurd_extreme_comparisons)]
14287        #[allow(unused_comparisons)]
14288        if __tmp.remaining() < Self::ENCODED_LEN {
14289            panic!(
14290                "buffer is too small (need {} bytes, but got {})",
14291                Self::ENCODED_LEN,
14292                __tmp.remaining(),
14293            )
14294        }
14295        __tmp.put_u32_le(self.time_last_baseline_ms);
14296        __tmp.put_u32_le(self.tow);
14297        __tmp.put_i32_le(self.baseline_a_mm);
14298        __tmp.put_i32_le(self.baseline_b_mm);
14299        __tmp.put_i32_le(self.baseline_c_mm);
14300        __tmp.put_u32_le(self.accuracy);
14301        __tmp.put_i32_le(self.iar_num_hypotheses);
14302        __tmp.put_u16_le(self.wn);
14303        __tmp.put_u8(self.rtk_receiver_id);
14304        __tmp.put_u8(self.rtk_health);
14305        __tmp.put_u8(self.rtk_rate);
14306        __tmp.put_u8(self.nsats);
14307        __tmp.put_u8(self.baseline_coords_type as u8);
14308        if matches!(version, MavlinkVersion::V2) {
14309            let len = __tmp.len();
14310            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14311        } else {
14312            __tmp.len()
14313        }
14314    }
14315}
14316#[doc = "id: 25"]
14317#[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
14318#[derive(Debug, Clone, PartialEq)]
14319#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14320#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14321pub struct GPS_STATUS_DATA {
14322    #[doc = "Number of satellites visible"]
14323    pub satellites_visible: u8,
14324    #[doc = "Global satellite ID"]
14325    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14326    pub satellite_prn: [u8; 20],
14327    #[doc = "0: Satellite not used, 1: used for localization"]
14328    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14329    pub satellite_used: [u8; 20],
14330    #[doc = "Elevation (0: right on top of receiver, 90: on the horizon) of satellite"]
14331    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14332    pub satellite_elevation: [u8; 20],
14333    #[doc = "Direction of satellite, 0: 0 deg, 255: 360 deg."]
14334    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14335    pub satellite_azimuth: [u8; 20],
14336    #[doc = "Signal to noise ratio of satellite"]
14337    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14338    pub satellite_snr: [u8; 20],
14339}
14340impl GPS_STATUS_DATA {
14341    pub const ENCODED_LEN: usize = 101usize;
14342    pub const DEFAULT: Self = Self {
14343        satellites_visible: 0_u8,
14344        satellite_prn: [0_u8; 20usize],
14345        satellite_used: [0_u8; 20usize],
14346        satellite_elevation: [0_u8; 20usize],
14347        satellite_azimuth: [0_u8; 20usize],
14348        satellite_snr: [0_u8; 20usize],
14349    };
14350    #[cfg(feature = "arbitrary")]
14351    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14352        use arbitrary::{Arbitrary, Unstructured};
14353        let mut buf = [0u8; 1024];
14354        rng.fill_bytes(&mut buf);
14355        let mut unstructured = Unstructured::new(&buf);
14356        Self::arbitrary(&mut unstructured).unwrap_or_default()
14357    }
14358}
14359impl Default for GPS_STATUS_DATA {
14360    fn default() -> Self {
14361        Self::DEFAULT.clone()
14362    }
14363}
14364impl MessageData for GPS_STATUS_DATA {
14365    type Message = MavMessage;
14366    const ID: u32 = 25u32;
14367    const NAME: &'static str = "GPS_STATUS";
14368    const EXTRA_CRC: u8 = 23u8;
14369    const ENCODED_LEN: usize = 101usize;
14370    fn deser(
14371        _version: MavlinkVersion,
14372        __input: &[u8],
14373    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14374        let avail_len = __input.len();
14375        let mut payload_buf = [0; Self::ENCODED_LEN];
14376        let mut buf = if avail_len < Self::ENCODED_LEN {
14377            payload_buf[0..avail_len].copy_from_slice(__input);
14378            Bytes::new(&payload_buf)
14379        } else {
14380            Bytes::new(__input)
14381        };
14382        let mut __struct = Self::default();
14383        __struct.satellites_visible = buf.get_u8();
14384        for v in &mut __struct.satellite_prn {
14385            let val = buf.get_u8();
14386            *v = val;
14387        }
14388        for v in &mut __struct.satellite_used {
14389            let val = buf.get_u8();
14390            *v = val;
14391        }
14392        for v in &mut __struct.satellite_elevation {
14393            let val = buf.get_u8();
14394            *v = val;
14395        }
14396        for v in &mut __struct.satellite_azimuth {
14397            let val = buf.get_u8();
14398            *v = val;
14399        }
14400        for v in &mut __struct.satellite_snr {
14401            let val = buf.get_u8();
14402            *v = val;
14403        }
14404        Ok(__struct)
14405    }
14406    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14407        let mut __tmp = BytesMut::new(bytes);
14408        #[allow(clippy::absurd_extreme_comparisons)]
14409        #[allow(unused_comparisons)]
14410        if __tmp.remaining() < Self::ENCODED_LEN {
14411            panic!(
14412                "buffer is too small (need {} bytes, but got {})",
14413                Self::ENCODED_LEN,
14414                __tmp.remaining(),
14415            )
14416        }
14417        __tmp.put_u8(self.satellites_visible);
14418        for val in &self.satellite_prn {
14419            __tmp.put_u8(*val);
14420        }
14421        for val in &self.satellite_used {
14422            __tmp.put_u8(*val);
14423        }
14424        for val in &self.satellite_elevation {
14425            __tmp.put_u8(*val);
14426        }
14427        for val in &self.satellite_azimuth {
14428            __tmp.put_u8(*val);
14429        }
14430        for val in &self.satellite_snr {
14431            __tmp.put_u8(*val);
14432        }
14433        if matches!(version, MavlinkVersion::V2) {
14434            let len = __tmp.len();
14435            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14436        } else {
14437            __tmp.len()
14438        }
14439    }
14440}
14441#[doc = "id: 0"]
14442#[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
14443#[derive(Debug, Clone, PartialEq)]
14444#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14445#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14446pub struct HEARTBEAT_DATA {
14447    #[doc = "A bitfield for use for autopilot-specific flags"]
14448    pub custom_mode: u32,
14449    #[doc = "Vehicle or component type. For a flight controller component the vehicle type (quadrotor, helicopter, etc.). For other components the component type (e.g. camera, gimbal, etc.). This should be used in preference to component id for identifying the component type."]
14450    pub mavtype: MavType,
14451    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
14452    pub autopilot: MavAutopilot,
14453    #[doc = "System mode bitmap."]
14454    pub base_mode: MavModeFlag,
14455    #[doc = "System status flag."]
14456    pub system_status: MavState,
14457    #[doc = "MAVLink version, not writable by user, gets added by protocol because of magic data type: uint8_t_mavlink_version"]
14458    pub mavlink_version: u8,
14459}
14460impl HEARTBEAT_DATA {
14461    pub const ENCODED_LEN: usize = 9usize;
14462    pub const DEFAULT: Self = Self {
14463        custom_mode: 0_u32,
14464        mavtype: MavType::DEFAULT,
14465        autopilot: MavAutopilot::DEFAULT,
14466        base_mode: MavModeFlag::DEFAULT,
14467        system_status: MavState::DEFAULT,
14468        mavlink_version: MINOR_MAVLINK_VERSION,
14469    };
14470    #[cfg(feature = "arbitrary")]
14471    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14472        use arbitrary::{Arbitrary, Unstructured};
14473        let mut buf = [0u8; 1024];
14474        rng.fill_bytes(&mut buf);
14475        let mut unstructured = Unstructured::new(&buf);
14476        Self::arbitrary(&mut unstructured).unwrap_or_default()
14477    }
14478}
14479impl Default for HEARTBEAT_DATA {
14480    fn default() -> Self {
14481        Self::DEFAULT.clone()
14482    }
14483}
14484impl MessageData for HEARTBEAT_DATA {
14485    type Message = MavMessage;
14486    const ID: u32 = 0u32;
14487    const NAME: &'static str = "HEARTBEAT";
14488    const EXTRA_CRC: u8 = 50u8;
14489    const ENCODED_LEN: usize = 9usize;
14490    fn deser(
14491        _version: MavlinkVersion,
14492        __input: &[u8],
14493    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14494        let avail_len = __input.len();
14495        let mut payload_buf = [0; Self::ENCODED_LEN];
14496        let mut buf = if avail_len < Self::ENCODED_LEN {
14497            payload_buf[0..avail_len].copy_from_slice(__input);
14498            Bytes::new(&payload_buf)
14499        } else {
14500            Bytes::new(__input)
14501        };
14502        let mut __struct = Self::default();
14503        __struct.custom_mode = buf.get_u32_le();
14504        let tmp = buf.get_u8();
14505        __struct.mavtype =
14506            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14507                enum_type: "MavType",
14508                value: tmp as u32,
14509            })?;
14510        let tmp = buf.get_u8();
14511        __struct.autopilot =
14512            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14513                enum_type: "MavAutopilot",
14514                value: tmp as u32,
14515            })?;
14516        let tmp = buf.get_u8();
14517        __struct.base_mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
14518            ::mavlink_core::error::ParserError::InvalidFlag {
14519                flag_type: "MavModeFlag",
14520                value: tmp as u32,
14521            },
14522        )?;
14523        let tmp = buf.get_u8();
14524        __struct.system_status =
14525            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14526                enum_type: "MavState",
14527                value: tmp as u32,
14528            })?;
14529        __struct.mavlink_version = buf.get_u8();
14530        Ok(__struct)
14531    }
14532    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14533        let mut __tmp = BytesMut::new(bytes);
14534        #[allow(clippy::absurd_extreme_comparisons)]
14535        #[allow(unused_comparisons)]
14536        if __tmp.remaining() < Self::ENCODED_LEN {
14537            panic!(
14538                "buffer is too small (need {} bytes, but got {})",
14539                Self::ENCODED_LEN,
14540                __tmp.remaining(),
14541            )
14542        }
14543        __tmp.put_u32_le(self.custom_mode);
14544        __tmp.put_u8(self.mavtype as u8);
14545        __tmp.put_u8(self.autopilot as u8);
14546        __tmp.put_u8(self.base_mode.bits());
14547        __tmp.put_u8(self.system_status as u8);
14548        __tmp.put_u8(self.mavlink_version);
14549        if matches!(version, MavlinkVersion::V2) {
14550            let len = __tmp.len();
14551            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14552        } else {
14553            __tmp.len()
14554        }
14555    }
14556}
14557#[doc = "id: 105"]
14558#[doc = "The IMU readings in SI units in NED body frame."]
14559#[derive(Debug, Clone, PartialEq)]
14560#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14561#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14562pub struct HIGHRES_IMU_DATA {
14563    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14564    pub time_usec: u64,
14565    #[doc = "X acceleration"]
14566    pub xacc: f32,
14567    #[doc = "Y acceleration"]
14568    pub yacc: f32,
14569    #[doc = "Z acceleration"]
14570    pub zacc: f32,
14571    #[doc = "Angular speed around X axis"]
14572    pub xgyro: f32,
14573    #[doc = "Angular speed around Y axis"]
14574    pub ygyro: f32,
14575    #[doc = "Angular speed around Z axis"]
14576    pub zgyro: f32,
14577    #[doc = "X Magnetic field"]
14578    pub xmag: f32,
14579    #[doc = "Y Magnetic field"]
14580    pub ymag: f32,
14581    #[doc = "Z Magnetic field"]
14582    pub zmag: f32,
14583    #[doc = "Absolute pressure"]
14584    pub abs_pressure: f32,
14585    #[doc = "Differential pressure"]
14586    pub diff_pressure: f32,
14587    #[doc = "Altitude calculated from pressure"]
14588    pub pressure_alt: f32,
14589    #[doc = "Temperature"]
14590    pub temperature: f32,
14591    #[doc = "Bitmap for fields that have updated since last message"]
14592    pub fields_updated: HighresImuUpdatedFlags,
14593    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
14594    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14595    pub id: u8,
14596}
14597impl HIGHRES_IMU_DATA {
14598    pub const ENCODED_LEN: usize = 63usize;
14599    pub const DEFAULT: Self = Self {
14600        time_usec: 0_u64,
14601        xacc: 0.0_f32,
14602        yacc: 0.0_f32,
14603        zacc: 0.0_f32,
14604        xgyro: 0.0_f32,
14605        ygyro: 0.0_f32,
14606        zgyro: 0.0_f32,
14607        xmag: 0.0_f32,
14608        ymag: 0.0_f32,
14609        zmag: 0.0_f32,
14610        abs_pressure: 0.0_f32,
14611        diff_pressure: 0.0_f32,
14612        pressure_alt: 0.0_f32,
14613        temperature: 0.0_f32,
14614        fields_updated: HighresImuUpdatedFlags::DEFAULT,
14615        id: 0_u8,
14616    };
14617    #[cfg(feature = "arbitrary")]
14618    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14619        use arbitrary::{Arbitrary, Unstructured};
14620        let mut buf = [0u8; 1024];
14621        rng.fill_bytes(&mut buf);
14622        let mut unstructured = Unstructured::new(&buf);
14623        Self::arbitrary(&mut unstructured).unwrap_or_default()
14624    }
14625}
14626impl Default for HIGHRES_IMU_DATA {
14627    fn default() -> Self {
14628        Self::DEFAULT.clone()
14629    }
14630}
14631impl MessageData for HIGHRES_IMU_DATA {
14632    type Message = MavMessage;
14633    const ID: u32 = 105u32;
14634    const NAME: &'static str = "HIGHRES_IMU";
14635    const EXTRA_CRC: u8 = 93u8;
14636    const ENCODED_LEN: usize = 63usize;
14637    fn deser(
14638        _version: MavlinkVersion,
14639        __input: &[u8],
14640    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14641        let avail_len = __input.len();
14642        let mut payload_buf = [0; Self::ENCODED_LEN];
14643        let mut buf = if avail_len < Self::ENCODED_LEN {
14644            payload_buf[0..avail_len].copy_from_slice(__input);
14645            Bytes::new(&payload_buf)
14646        } else {
14647            Bytes::new(__input)
14648        };
14649        let mut __struct = Self::default();
14650        __struct.time_usec = buf.get_u64_le();
14651        __struct.xacc = buf.get_f32_le();
14652        __struct.yacc = buf.get_f32_le();
14653        __struct.zacc = buf.get_f32_le();
14654        __struct.xgyro = buf.get_f32_le();
14655        __struct.ygyro = buf.get_f32_le();
14656        __struct.zgyro = buf.get_f32_le();
14657        __struct.xmag = buf.get_f32_le();
14658        __struct.ymag = buf.get_f32_le();
14659        __struct.zmag = buf.get_f32_le();
14660        __struct.abs_pressure = buf.get_f32_le();
14661        __struct.diff_pressure = buf.get_f32_le();
14662        __struct.pressure_alt = buf.get_f32_le();
14663        __struct.temperature = buf.get_f32_le();
14664        let tmp = buf.get_u16_le();
14665        __struct.fields_updated = HighresImuUpdatedFlags::from_bits(
14666            tmp & HighresImuUpdatedFlags::all().bits(),
14667        )
14668        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
14669            flag_type: "HighresImuUpdatedFlags",
14670            value: tmp as u32,
14671        })?;
14672        __struct.id = buf.get_u8();
14673        Ok(__struct)
14674    }
14675    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14676        let mut __tmp = BytesMut::new(bytes);
14677        #[allow(clippy::absurd_extreme_comparisons)]
14678        #[allow(unused_comparisons)]
14679        if __tmp.remaining() < Self::ENCODED_LEN {
14680            panic!(
14681                "buffer is too small (need {} bytes, but got {})",
14682                Self::ENCODED_LEN,
14683                __tmp.remaining(),
14684            )
14685        }
14686        __tmp.put_u64_le(self.time_usec);
14687        __tmp.put_f32_le(self.xacc);
14688        __tmp.put_f32_le(self.yacc);
14689        __tmp.put_f32_le(self.zacc);
14690        __tmp.put_f32_le(self.xgyro);
14691        __tmp.put_f32_le(self.ygyro);
14692        __tmp.put_f32_le(self.zgyro);
14693        __tmp.put_f32_le(self.xmag);
14694        __tmp.put_f32_le(self.ymag);
14695        __tmp.put_f32_le(self.zmag);
14696        __tmp.put_f32_le(self.abs_pressure);
14697        __tmp.put_f32_le(self.diff_pressure);
14698        __tmp.put_f32_le(self.pressure_alt);
14699        __tmp.put_f32_le(self.temperature);
14700        __tmp.put_u16_le(self.fields_updated.bits());
14701        __tmp.put_u8(self.id);
14702        if matches!(version, MavlinkVersion::V2) {
14703            let len = __tmp.len();
14704            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14705        } else {
14706            __tmp.len()
14707        }
14708    }
14709}
14710#[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
14711#[doc = "id: 234"]
14712#[doc = "Message appropriate for high latency connections like Iridium."]
14713#[derive(Debug, Clone, PartialEq)]
14714#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14715#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14716pub struct HIGH_LATENCY_DATA {
14717    #[doc = "A bitfield for use for autopilot-specific flags."]
14718    pub custom_mode: u32,
14719    #[doc = "Latitude"]
14720    pub latitude: i32,
14721    #[doc = "Longitude"]
14722    pub longitude: i32,
14723    #[doc = "roll"]
14724    pub roll: i16,
14725    #[doc = "pitch"]
14726    pub pitch: i16,
14727    #[doc = "heading"]
14728    pub heading: u16,
14729    #[doc = "heading setpoint"]
14730    pub heading_sp: i16,
14731    #[doc = "Altitude above mean sea level"]
14732    pub altitude_amsl: i16,
14733    #[doc = "Altitude setpoint relative to the home position"]
14734    pub altitude_sp: i16,
14735    #[doc = "distance to target"]
14736    pub wp_distance: u16,
14737    #[doc = "Bitmap of enabled system modes."]
14738    pub base_mode: MavModeFlag,
14739    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
14740    pub landed_state: MavLandedState,
14741    #[doc = "throttle (percentage)"]
14742    pub throttle: i8,
14743    #[doc = "airspeed"]
14744    pub airspeed: u8,
14745    #[doc = "airspeed setpoint"]
14746    pub airspeed_sp: u8,
14747    #[doc = "groundspeed"]
14748    pub groundspeed: u8,
14749    #[doc = "climb rate"]
14750    pub climb_rate: i8,
14751    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
14752    pub gps_nsat: u8,
14753    #[doc = "GPS Fix type."]
14754    pub gps_fix_type: GpsFixType,
14755    #[doc = "Remaining battery (percentage)"]
14756    pub battery_remaining: u8,
14757    #[doc = "Autopilot temperature (degrees C)"]
14758    pub temperature: i8,
14759    #[doc = "Air temperature (degrees C) from airspeed sensor"]
14760    pub temperature_air: i8,
14761    #[doc = "failsafe (each bit represents a failsafe where 0=ok, 1=failsafe active (bit0:RC, bit1:batt, bit2:GPS, bit3:GCS, bit4:fence)"]
14762    pub failsafe: u8,
14763    #[doc = "current waypoint number"]
14764    pub wp_num: u8,
14765}
14766impl HIGH_LATENCY_DATA {
14767    pub const ENCODED_LEN: usize = 40usize;
14768    pub const DEFAULT: Self = Self {
14769        custom_mode: 0_u32,
14770        latitude: 0_i32,
14771        longitude: 0_i32,
14772        roll: 0_i16,
14773        pitch: 0_i16,
14774        heading: 0_u16,
14775        heading_sp: 0_i16,
14776        altitude_amsl: 0_i16,
14777        altitude_sp: 0_i16,
14778        wp_distance: 0_u16,
14779        base_mode: MavModeFlag::DEFAULT,
14780        landed_state: MavLandedState::DEFAULT,
14781        throttle: 0_i8,
14782        airspeed: 0_u8,
14783        airspeed_sp: 0_u8,
14784        groundspeed: 0_u8,
14785        climb_rate: 0_i8,
14786        gps_nsat: 0_u8,
14787        gps_fix_type: GpsFixType::DEFAULT,
14788        battery_remaining: 0_u8,
14789        temperature: 0_i8,
14790        temperature_air: 0_i8,
14791        failsafe: 0_u8,
14792        wp_num: 0_u8,
14793    };
14794    #[cfg(feature = "arbitrary")]
14795    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14796        use arbitrary::{Arbitrary, Unstructured};
14797        let mut buf = [0u8; 1024];
14798        rng.fill_bytes(&mut buf);
14799        let mut unstructured = Unstructured::new(&buf);
14800        Self::arbitrary(&mut unstructured).unwrap_or_default()
14801    }
14802}
14803impl Default for HIGH_LATENCY_DATA {
14804    fn default() -> Self {
14805        Self::DEFAULT.clone()
14806    }
14807}
14808impl MessageData for HIGH_LATENCY_DATA {
14809    type Message = MavMessage;
14810    const ID: u32 = 234u32;
14811    const NAME: &'static str = "HIGH_LATENCY";
14812    const EXTRA_CRC: u8 = 150u8;
14813    const ENCODED_LEN: usize = 40usize;
14814    fn deser(
14815        _version: MavlinkVersion,
14816        __input: &[u8],
14817    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14818        let avail_len = __input.len();
14819        let mut payload_buf = [0; Self::ENCODED_LEN];
14820        let mut buf = if avail_len < Self::ENCODED_LEN {
14821            payload_buf[0..avail_len].copy_from_slice(__input);
14822            Bytes::new(&payload_buf)
14823        } else {
14824            Bytes::new(__input)
14825        };
14826        let mut __struct = Self::default();
14827        __struct.custom_mode = buf.get_u32_le();
14828        __struct.latitude = buf.get_i32_le();
14829        __struct.longitude = buf.get_i32_le();
14830        __struct.roll = buf.get_i16_le();
14831        __struct.pitch = buf.get_i16_le();
14832        __struct.heading = buf.get_u16_le();
14833        __struct.heading_sp = buf.get_i16_le();
14834        __struct.altitude_amsl = buf.get_i16_le();
14835        __struct.altitude_sp = buf.get_i16_le();
14836        __struct.wp_distance = buf.get_u16_le();
14837        let tmp = buf.get_u8();
14838        __struct.base_mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
14839            ::mavlink_core::error::ParserError::InvalidFlag {
14840                flag_type: "MavModeFlag",
14841                value: tmp as u32,
14842            },
14843        )?;
14844        let tmp = buf.get_u8();
14845        __struct.landed_state =
14846            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14847                enum_type: "MavLandedState",
14848                value: tmp as u32,
14849            })?;
14850        __struct.throttle = buf.get_i8();
14851        __struct.airspeed = buf.get_u8();
14852        __struct.airspeed_sp = buf.get_u8();
14853        __struct.groundspeed = buf.get_u8();
14854        __struct.climb_rate = buf.get_i8();
14855        __struct.gps_nsat = buf.get_u8();
14856        let tmp = buf.get_u8();
14857        __struct.gps_fix_type =
14858            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14859                enum_type: "GpsFixType",
14860                value: tmp as u32,
14861            })?;
14862        __struct.battery_remaining = buf.get_u8();
14863        __struct.temperature = buf.get_i8();
14864        __struct.temperature_air = buf.get_i8();
14865        __struct.failsafe = buf.get_u8();
14866        __struct.wp_num = buf.get_u8();
14867        Ok(__struct)
14868    }
14869    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14870        let mut __tmp = BytesMut::new(bytes);
14871        #[allow(clippy::absurd_extreme_comparisons)]
14872        #[allow(unused_comparisons)]
14873        if __tmp.remaining() < Self::ENCODED_LEN {
14874            panic!(
14875                "buffer is too small (need {} bytes, but got {})",
14876                Self::ENCODED_LEN,
14877                __tmp.remaining(),
14878            )
14879        }
14880        __tmp.put_u32_le(self.custom_mode);
14881        __tmp.put_i32_le(self.latitude);
14882        __tmp.put_i32_le(self.longitude);
14883        __tmp.put_i16_le(self.roll);
14884        __tmp.put_i16_le(self.pitch);
14885        __tmp.put_u16_le(self.heading);
14886        __tmp.put_i16_le(self.heading_sp);
14887        __tmp.put_i16_le(self.altitude_amsl);
14888        __tmp.put_i16_le(self.altitude_sp);
14889        __tmp.put_u16_le(self.wp_distance);
14890        __tmp.put_u8(self.base_mode.bits());
14891        __tmp.put_u8(self.landed_state as u8);
14892        __tmp.put_i8(self.throttle);
14893        __tmp.put_u8(self.airspeed);
14894        __tmp.put_u8(self.airspeed_sp);
14895        __tmp.put_u8(self.groundspeed);
14896        __tmp.put_i8(self.climb_rate);
14897        __tmp.put_u8(self.gps_nsat);
14898        __tmp.put_u8(self.gps_fix_type as u8);
14899        __tmp.put_u8(self.battery_remaining);
14900        __tmp.put_i8(self.temperature);
14901        __tmp.put_i8(self.temperature_air);
14902        __tmp.put_u8(self.failsafe);
14903        __tmp.put_u8(self.wp_num);
14904        if matches!(version, MavlinkVersion::V2) {
14905            let len = __tmp.len();
14906            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14907        } else {
14908            __tmp.len()
14909        }
14910    }
14911}
14912#[doc = "id: 235"]
14913#[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
14914#[derive(Debug, Clone, PartialEq)]
14915#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14916#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14917pub struct HIGH_LATENCY2_DATA {
14918    #[doc = "Timestamp (milliseconds since boot or Unix epoch)"]
14919    pub timestamp: u32,
14920    #[doc = "Latitude"]
14921    pub latitude: i32,
14922    #[doc = "Longitude"]
14923    pub longitude: i32,
14924    #[doc = "A bitfield for use for autopilot-specific flags (2 byte version)."]
14925    pub custom_mode: u16,
14926    #[doc = "Altitude above mean sea level"]
14927    pub altitude: i16,
14928    #[doc = "Altitude setpoint"]
14929    pub target_altitude: i16,
14930    #[doc = "Distance to target waypoint or position"]
14931    pub target_distance: u16,
14932    #[doc = "Current waypoint number"]
14933    pub wp_num: u16,
14934    #[doc = "Bitmap of failure flags."]
14935    pub failure_flags: HlFailureFlag,
14936    #[doc = "Type of the MAV (quadrotor, helicopter, etc.)"]
14937    pub mavtype: MavType,
14938    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
14939    pub autopilot: MavAutopilot,
14940    #[doc = "Heading"]
14941    pub heading: u8,
14942    #[doc = "Heading setpoint"]
14943    pub target_heading: u8,
14944    #[doc = "Throttle"]
14945    pub throttle: u8,
14946    #[doc = "Airspeed"]
14947    pub airspeed: u8,
14948    #[doc = "Airspeed setpoint"]
14949    pub airspeed_sp: u8,
14950    #[doc = "Groundspeed"]
14951    pub groundspeed: u8,
14952    #[doc = "Windspeed"]
14953    pub windspeed: u8,
14954    #[doc = "Wind heading"]
14955    pub wind_heading: u8,
14956    #[doc = "Maximum error horizontal position since last message"]
14957    pub eph: u8,
14958    #[doc = "Maximum error vertical position since last message"]
14959    pub epv: u8,
14960    #[doc = "Air temperature"]
14961    pub temperature_air: i8,
14962    #[doc = "Maximum climb rate magnitude since last message"]
14963    pub climb_rate: i8,
14964    #[doc = "Battery level (-1 if field not provided)."]
14965    pub battery: i8,
14966    #[doc = "Field for custom payload."]
14967    pub custom0: i8,
14968    #[doc = "Field for custom payload."]
14969    pub custom1: i8,
14970    #[doc = "Field for custom payload."]
14971    pub custom2: i8,
14972}
14973impl HIGH_LATENCY2_DATA {
14974    pub const ENCODED_LEN: usize = 42usize;
14975    pub const DEFAULT: Self = Self {
14976        timestamp: 0_u32,
14977        latitude: 0_i32,
14978        longitude: 0_i32,
14979        custom_mode: 0_u16,
14980        altitude: 0_i16,
14981        target_altitude: 0_i16,
14982        target_distance: 0_u16,
14983        wp_num: 0_u16,
14984        failure_flags: HlFailureFlag::DEFAULT,
14985        mavtype: MavType::DEFAULT,
14986        autopilot: MavAutopilot::DEFAULT,
14987        heading: 0_u8,
14988        target_heading: 0_u8,
14989        throttle: 0_u8,
14990        airspeed: 0_u8,
14991        airspeed_sp: 0_u8,
14992        groundspeed: 0_u8,
14993        windspeed: 0_u8,
14994        wind_heading: 0_u8,
14995        eph: 0_u8,
14996        epv: 0_u8,
14997        temperature_air: 0_i8,
14998        climb_rate: 0_i8,
14999        battery: 0_i8,
15000        custom0: 0_i8,
15001        custom1: 0_i8,
15002        custom2: 0_i8,
15003    };
15004    #[cfg(feature = "arbitrary")]
15005    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15006        use arbitrary::{Arbitrary, Unstructured};
15007        let mut buf = [0u8; 1024];
15008        rng.fill_bytes(&mut buf);
15009        let mut unstructured = Unstructured::new(&buf);
15010        Self::arbitrary(&mut unstructured).unwrap_or_default()
15011    }
15012}
15013impl Default for HIGH_LATENCY2_DATA {
15014    fn default() -> Self {
15015        Self::DEFAULT.clone()
15016    }
15017}
15018impl MessageData for HIGH_LATENCY2_DATA {
15019    type Message = MavMessage;
15020    const ID: u32 = 235u32;
15021    const NAME: &'static str = "HIGH_LATENCY2";
15022    const EXTRA_CRC: u8 = 179u8;
15023    const ENCODED_LEN: usize = 42usize;
15024    fn deser(
15025        _version: MavlinkVersion,
15026        __input: &[u8],
15027    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15028        let avail_len = __input.len();
15029        let mut payload_buf = [0; Self::ENCODED_LEN];
15030        let mut buf = if avail_len < Self::ENCODED_LEN {
15031            payload_buf[0..avail_len].copy_from_slice(__input);
15032            Bytes::new(&payload_buf)
15033        } else {
15034            Bytes::new(__input)
15035        };
15036        let mut __struct = Self::default();
15037        __struct.timestamp = buf.get_u32_le();
15038        __struct.latitude = buf.get_i32_le();
15039        __struct.longitude = buf.get_i32_le();
15040        __struct.custom_mode = buf.get_u16_le();
15041        __struct.altitude = buf.get_i16_le();
15042        __struct.target_altitude = buf.get_i16_le();
15043        __struct.target_distance = buf.get_u16_le();
15044        __struct.wp_num = buf.get_u16_le();
15045        let tmp = buf.get_u16_le();
15046        __struct.failure_flags = HlFailureFlag::from_bits(tmp & HlFailureFlag::all().bits())
15047            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15048                flag_type: "HlFailureFlag",
15049                value: tmp as u32,
15050            })?;
15051        let tmp = buf.get_u8();
15052        __struct.mavtype =
15053            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15054                enum_type: "MavType",
15055                value: tmp as u32,
15056            })?;
15057        let tmp = buf.get_u8();
15058        __struct.autopilot =
15059            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15060                enum_type: "MavAutopilot",
15061                value: tmp as u32,
15062            })?;
15063        __struct.heading = buf.get_u8();
15064        __struct.target_heading = buf.get_u8();
15065        __struct.throttle = buf.get_u8();
15066        __struct.airspeed = buf.get_u8();
15067        __struct.airspeed_sp = buf.get_u8();
15068        __struct.groundspeed = buf.get_u8();
15069        __struct.windspeed = buf.get_u8();
15070        __struct.wind_heading = buf.get_u8();
15071        __struct.eph = buf.get_u8();
15072        __struct.epv = buf.get_u8();
15073        __struct.temperature_air = buf.get_i8();
15074        __struct.climb_rate = buf.get_i8();
15075        __struct.battery = buf.get_i8();
15076        __struct.custom0 = buf.get_i8();
15077        __struct.custom1 = buf.get_i8();
15078        __struct.custom2 = buf.get_i8();
15079        Ok(__struct)
15080    }
15081    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15082        let mut __tmp = BytesMut::new(bytes);
15083        #[allow(clippy::absurd_extreme_comparisons)]
15084        #[allow(unused_comparisons)]
15085        if __tmp.remaining() < Self::ENCODED_LEN {
15086            panic!(
15087                "buffer is too small (need {} bytes, but got {})",
15088                Self::ENCODED_LEN,
15089                __tmp.remaining(),
15090            )
15091        }
15092        __tmp.put_u32_le(self.timestamp);
15093        __tmp.put_i32_le(self.latitude);
15094        __tmp.put_i32_le(self.longitude);
15095        __tmp.put_u16_le(self.custom_mode);
15096        __tmp.put_i16_le(self.altitude);
15097        __tmp.put_i16_le(self.target_altitude);
15098        __tmp.put_u16_le(self.target_distance);
15099        __tmp.put_u16_le(self.wp_num);
15100        __tmp.put_u16_le(self.failure_flags.bits());
15101        __tmp.put_u8(self.mavtype as u8);
15102        __tmp.put_u8(self.autopilot as u8);
15103        __tmp.put_u8(self.heading);
15104        __tmp.put_u8(self.target_heading);
15105        __tmp.put_u8(self.throttle);
15106        __tmp.put_u8(self.airspeed);
15107        __tmp.put_u8(self.airspeed_sp);
15108        __tmp.put_u8(self.groundspeed);
15109        __tmp.put_u8(self.windspeed);
15110        __tmp.put_u8(self.wind_heading);
15111        __tmp.put_u8(self.eph);
15112        __tmp.put_u8(self.epv);
15113        __tmp.put_i8(self.temperature_air);
15114        __tmp.put_i8(self.climb_rate);
15115        __tmp.put_i8(self.battery);
15116        __tmp.put_i8(self.custom0);
15117        __tmp.put_i8(self.custom1);
15118        __tmp.put_i8(self.custom2);
15119        if matches!(version, MavlinkVersion::V2) {
15120            let len = __tmp.len();
15121            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15122        } else {
15123            __tmp.len()
15124        }
15125    }
15126}
15127#[doc = "id: 93"]
15128#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
15129#[derive(Debug, Clone, PartialEq)]
15130#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15131#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15132pub struct HIL_ACTUATOR_CONTROLS_DATA {
15133    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15134    pub time_usec: u64,
15135    #[doc = "Flags bitmask."]
15136    pub flags: HilActuatorControlsFlags,
15137    #[doc = "Control outputs -1 .. 1. Channel assignment depends on the simulated hardware."]
15138    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15139    pub controls: [f32; 16],
15140    #[doc = "System mode. Includes arming state."]
15141    pub mode: MavModeFlag,
15142}
15143impl HIL_ACTUATOR_CONTROLS_DATA {
15144    pub const ENCODED_LEN: usize = 81usize;
15145    pub const DEFAULT: Self = Self {
15146        time_usec: 0_u64,
15147        flags: HilActuatorControlsFlags::DEFAULT,
15148        controls: [0.0_f32; 16usize],
15149        mode: MavModeFlag::DEFAULT,
15150    };
15151    #[cfg(feature = "arbitrary")]
15152    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15153        use arbitrary::{Arbitrary, Unstructured};
15154        let mut buf = [0u8; 1024];
15155        rng.fill_bytes(&mut buf);
15156        let mut unstructured = Unstructured::new(&buf);
15157        Self::arbitrary(&mut unstructured).unwrap_or_default()
15158    }
15159}
15160impl Default for HIL_ACTUATOR_CONTROLS_DATA {
15161    fn default() -> Self {
15162        Self::DEFAULT.clone()
15163    }
15164}
15165impl MessageData for HIL_ACTUATOR_CONTROLS_DATA {
15166    type Message = MavMessage;
15167    const ID: u32 = 93u32;
15168    const NAME: &'static str = "HIL_ACTUATOR_CONTROLS";
15169    const EXTRA_CRC: u8 = 47u8;
15170    const ENCODED_LEN: usize = 81usize;
15171    fn deser(
15172        _version: MavlinkVersion,
15173        __input: &[u8],
15174    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15175        let avail_len = __input.len();
15176        let mut payload_buf = [0; Self::ENCODED_LEN];
15177        let mut buf = if avail_len < Self::ENCODED_LEN {
15178            payload_buf[0..avail_len].copy_from_slice(__input);
15179            Bytes::new(&payload_buf)
15180        } else {
15181            Bytes::new(__input)
15182        };
15183        let mut __struct = Self::default();
15184        __struct.time_usec = buf.get_u64_le();
15185        let tmp = buf.get_u64_le();
15186        __struct.flags =
15187            HilActuatorControlsFlags::from_bits(tmp & HilActuatorControlsFlags::all().bits())
15188                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15189                    flag_type: "HilActuatorControlsFlags",
15190                    value: tmp as u32,
15191                })?;
15192        for v in &mut __struct.controls {
15193            let val = buf.get_f32_le();
15194            *v = val;
15195        }
15196        let tmp = buf.get_u8();
15197        __struct.mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
15198            ::mavlink_core::error::ParserError::InvalidFlag {
15199                flag_type: "MavModeFlag",
15200                value: tmp as u32,
15201            },
15202        )?;
15203        Ok(__struct)
15204    }
15205    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15206        let mut __tmp = BytesMut::new(bytes);
15207        #[allow(clippy::absurd_extreme_comparisons)]
15208        #[allow(unused_comparisons)]
15209        if __tmp.remaining() < Self::ENCODED_LEN {
15210            panic!(
15211                "buffer is too small (need {} bytes, but got {})",
15212                Self::ENCODED_LEN,
15213                __tmp.remaining(),
15214            )
15215        }
15216        __tmp.put_u64_le(self.time_usec);
15217        __tmp.put_u64_le(self.flags.bits());
15218        for val in &self.controls {
15219            __tmp.put_f32_le(*val);
15220        }
15221        __tmp.put_u8(self.mode.bits());
15222        if matches!(version, MavlinkVersion::V2) {
15223            let len = __tmp.len();
15224            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15225        } else {
15226            __tmp.len()
15227        }
15228    }
15229}
15230#[doc = "id: 91"]
15231#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
15232#[derive(Debug, Clone, PartialEq)]
15233#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15234#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15235pub struct HIL_CONTROLS_DATA {
15236    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15237    pub time_usec: u64,
15238    #[doc = "Control output -1 .. 1"]
15239    pub roll_ailerons: f32,
15240    #[doc = "Control output -1 .. 1"]
15241    pub pitch_elevator: f32,
15242    #[doc = "Control output -1 .. 1"]
15243    pub yaw_rudder: f32,
15244    #[doc = "Throttle 0 .. 1"]
15245    pub throttle: f32,
15246    #[doc = "Aux 1, -1 .. 1"]
15247    pub aux1: f32,
15248    #[doc = "Aux 2, -1 .. 1"]
15249    pub aux2: f32,
15250    #[doc = "Aux 3, -1 .. 1"]
15251    pub aux3: f32,
15252    #[doc = "Aux 4, -1 .. 1"]
15253    pub aux4: f32,
15254    #[doc = "System mode."]
15255    pub mode: MavMode,
15256    #[doc = "Navigation mode (MAV_NAV_MODE)"]
15257    pub nav_mode: u8,
15258}
15259impl HIL_CONTROLS_DATA {
15260    pub const ENCODED_LEN: usize = 42usize;
15261    pub const DEFAULT: Self = Self {
15262        time_usec: 0_u64,
15263        roll_ailerons: 0.0_f32,
15264        pitch_elevator: 0.0_f32,
15265        yaw_rudder: 0.0_f32,
15266        throttle: 0.0_f32,
15267        aux1: 0.0_f32,
15268        aux2: 0.0_f32,
15269        aux3: 0.0_f32,
15270        aux4: 0.0_f32,
15271        mode: MavMode::DEFAULT,
15272        nav_mode: 0_u8,
15273    };
15274    #[cfg(feature = "arbitrary")]
15275    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15276        use arbitrary::{Arbitrary, Unstructured};
15277        let mut buf = [0u8; 1024];
15278        rng.fill_bytes(&mut buf);
15279        let mut unstructured = Unstructured::new(&buf);
15280        Self::arbitrary(&mut unstructured).unwrap_or_default()
15281    }
15282}
15283impl Default for HIL_CONTROLS_DATA {
15284    fn default() -> Self {
15285        Self::DEFAULT.clone()
15286    }
15287}
15288impl MessageData for HIL_CONTROLS_DATA {
15289    type Message = MavMessage;
15290    const ID: u32 = 91u32;
15291    const NAME: &'static str = "HIL_CONTROLS";
15292    const EXTRA_CRC: u8 = 63u8;
15293    const ENCODED_LEN: usize = 42usize;
15294    fn deser(
15295        _version: MavlinkVersion,
15296        __input: &[u8],
15297    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15298        let avail_len = __input.len();
15299        let mut payload_buf = [0; Self::ENCODED_LEN];
15300        let mut buf = if avail_len < Self::ENCODED_LEN {
15301            payload_buf[0..avail_len].copy_from_slice(__input);
15302            Bytes::new(&payload_buf)
15303        } else {
15304            Bytes::new(__input)
15305        };
15306        let mut __struct = Self::default();
15307        __struct.time_usec = buf.get_u64_le();
15308        __struct.roll_ailerons = buf.get_f32_le();
15309        __struct.pitch_elevator = buf.get_f32_le();
15310        __struct.yaw_rudder = buf.get_f32_le();
15311        __struct.throttle = buf.get_f32_le();
15312        __struct.aux1 = buf.get_f32_le();
15313        __struct.aux2 = buf.get_f32_le();
15314        __struct.aux3 = buf.get_f32_le();
15315        __struct.aux4 = buf.get_f32_le();
15316        let tmp = buf.get_u8();
15317        __struct.mode =
15318            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15319                enum_type: "MavMode",
15320                value: tmp as u32,
15321            })?;
15322        __struct.nav_mode = buf.get_u8();
15323        Ok(__struct)
15324    }
15325    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15326        let mut __tmp = BytesMut::new(bytes);
15327        #[allow(clippy::absurd_extreme_comparisons)]
15328        #[allow(unused_comparisons)]
15329        if __tmp.remaining() < Self::ENCODED_LEN {
15330            panic!(
15331                "buffer is too small (need {} bytes, but got {})",
15332                Self::ENCODED_LEN,
15333                __tmp.remaining(),
15334            )
15335        }
15336        __tmp.put_u64_le(self.time_usec);
15337        __tmp.put_f32_le(self.roll_ailerons);
15338        __tmp.put_f32_le(self.pitch_elevator);
15339        __tmp.put_f32_le(self.yaw_rudder);
15340        __tmp.put_f32_le(self.throttle);
15341        __tmp.put_f32_le(self.aux1);
15342        __tmp.put_f32_le(self.aux2);
15343        __tmp.put_f32_le(self.aux3);
15344        __tmp.put_f32_le(self.aux4);
15345        __tmp.put_u8(self.mode as u8);
15346        __tmp.put_u8(self.nav_mode);
15347        if matches!(version, MavlinkVersion::V2) {
15348            let len = __tmp.len();
15349            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15350        } else {
15351            __tmp.len()
15352        }
15353    }
15354}
15355#[doc = "id: 113"]
15356#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
15357#[derive(Debug, Clone, PartialEq)]
15358#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15359#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15360pub struct HIL_GPS_DATA {
15361    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15362    pub time_usec: u64,
15363    #[doc = "Latitude (WGS84)"]
15364    pub lat: i32,
15365    #[doc = "Longitude (WGS84)"]
15366    pub lon: i32,
15367    #[doc = "Altitude (MSL). Positive for up."]
15368    pub alt: i32,
15369    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
15370    pub eph: u16,
15371    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
15372    pub epv: u16,
15373    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
15374    pub vel: u16,
15375    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
15376    pub vn: i16,
15377    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
15378    pub ve: i16,
15379    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
15380    pub vd: i16,
15381    #[doc = "Course over ground (NOT heading, but direction of movement), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
15382    pub cog: u16,
15383    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix."]
15384    pub fix_type: u8,
15385    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
15386    pub satellites_visible: u8,
15387    #[doc = "GPS ID (zero indexed). Used for multiple GPS inputs"]
15388    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15389    pub id: u8,
15390    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
15391    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15392    pub yaw: u16,
15393}
15394impl HIL_GPS_DATA {
15395    pub const ENCODED_LEN: usize = 39usize;
15396    pub const DEFAULT: Self = Self {
15397        time_usec: 0_u64,
15398        lat: 0_i32,
15399        lon: 0_i32,
15400        alt: 0_i32,
15401        eph: 0_u16,
15402        epv: 0_u16,
15403        vel: 0_u16,
15404        vn: 0_i16,
15405        ve: 0_i16,
15406        vd: 0_i16,
15407        cog: 0_u16,
15408        fix_type: 0_u8,
15409        satellites_visible: 0_u8,
15410        id: 0_u8,
15411        yaw: 0_u16,
15412    };
15413    #[cfg(feature = "arbitrary")]
15414    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15415        use arbitrary::{Arbitrary, Unstructured};
15416        let mut buf = [0u8; 1024];
15417        rng.fill_bytes(&mut buf);
15418        let mut unstructured = Unstructured::new(&buf);
15419        Self::arbitrary(&mut unstructured).unwrap_or_default()
15420    }
15421}
15422impl Default for HIL_GPS_DATA {
15423    fn default() -> Self {
15424        Self::DEFAULT.clone()
15425    }
15426}
15427impl MessageData for HIL_GPS_DATA {
15428    type Message = MavMessage;
15429    const ID: u32 = 113u32;
15430    const NAME: &'static str = "HIL_GPS";
15431    const EXTRA_CRC: u8 = 124u8;
15432    const ENCODED_LEN: usize = 39usize;
15433    fn deser(
15434        _version: MavlinkVersion,
15435        __input: &[u8],
15436    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15437        let avail_len = __input.len();
15438        let mut payload_buf = [0; Self::ENCODED_LEN];
15439        let mut buf = if avail_len < Self::ENCODED_LEN {
15440            payload_buf[0..avail_len].copy_from_slice(__input);
15441            Bytes::new(&payload_buf)
15442        } else {
15443            Bytes::new(__input)
15444        };
15445        let mut __struct = Self::default();
15446        __struct.time_usec = buf.get_u64_le();
15447        __struct.lat = buf.get_i32_le();
15448        __struct.lon = buf.get_i32_le();
15449        __struct.alt = buf.get_i32_le();
15450        __struct.eph = buf.get_u16_le();
15451        __struct.epv = buf.get_u16_le();
15452        __struct.vel = buf.get_u16_le();
15453        __struct.vn = buf.get_i16_le();
15454        __struct.ve = buf.get_i16_le();
15455        __struct.vd = buf.get_i16_le();
15456        __struct.cog = buf.get_u16_le();
15457        __struct.fix_type = buf.get_u8();
15458        __struct.satellites_visible = buf.get_u8();
15459        __struct.id = buf.get_u8();
15460        __struct.yaw = buf.get_u16_le();
15461        Ok(__struct)
15462    }
15463    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15464        let mut __tmp = BytesMut::new(bytes);
15465        #[allow(clippy::absurd_extreme_comparisons)]
15466        #[allow(unused_comparisons)]
15467        if __tmp.remaining() < Self::ENCODED_LEN {
15468            panic!(
15469                "buffer is too small (need {} bytes, but got {})",
15470                Self::ENCODED_LEN,
15471                __tmp.remaining(),
15472            )
15473        }
15474        __tmp.put_u64_le(self.time_usec);
15475        __tmp.put_i32_le(self.lat);
15476        __tmp.put_i32_le(self.lon);
15477        __tmp.put_i32_le(self.alt);
15478        __tmp.put_u16_le(self.eph);
15479        __tmp.put_u16_le(self.epv);
15480        __tmp.put_u16_le(self.vel);
15481        __tmp.put_i16_le(self.vn);
15482        __tmp.put_i16_le(self.ve);
15483        __tmp.put_i16_le(self.vd);
15484        __tmp.put_u16_le(self.cog);
15485        __tmp.put_u8(self.fix_type);
15486        __tmp.put_u8(self.satellites_visible);
15487        __tmp.put_u8(self.id);
15488        __tmp.put_u16_le(self.yaw);
15489        if matches!(version, MavlinkVersion::V2) {
15490            let len = __tmp.len();
15491            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15492        } else {
15493            __tmp.len()
15494        }
15495    }
15496}
15497#[doc = "id: 114"]
15498#[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
15499#[derive(Debug, Clone, PartialEq)]
15500#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15501#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15502pub struct HIL_OPTICAL_FLOW_DATA {
15503    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15504    pub time_usec: u64,
15505    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
15506    pub integration_time_us: u32,
15507    #[doc = "Flow in radians around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
15508    pub integrated_x: f32,
15509    #[doc = "Flow in radians around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
15510    pub integrated_y: f32,
15511    #[doc = "RH rotation around X axis"]
15512    pub integrated_xgyro: f32,
15513    #[doc = "RH rotation around Y axis"]
15514    pub integrated_ygyro: f32,
15515    #[doc = "RH rotation around Z axis"]
15516    pub integrated_zgyro: f32,
15517    #[doc = "Time since the distance was sampled."]
15518    pub time_delta_distance_us: u32,
15519    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
15520    pub distance: f32,
15521    #[doc = "Temperature"]
15522    pub temperature: i16,
15523    #[doc = "Sensor ID"]
15524    pub sensor_id: u8,
15525    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
15526    pub quality: u8,
15527}
15528impl HIL_OPTICAL_FLOW_DATA {
15529    pub const ENCODED_LEN: usize = 44usize;
15530    pub const DEFAULT: Self = Self {
15531        time_usec: 0_u64,
15532        integration_time_us: 0_u32,
15533        integrated_x: 0.0_f32,
15534        integrated_y: 0.0_f32,
15535        integrated_xgyro: 0.0_f32,
15536        integrated_ygyro: 0.0_f32,
15537        integrated_zgyro: 0.0_f32,
15538        time_delta_distance_us: 0_u32,
15539        distance: 0.0_f32,
15540        temperature: 0_i16,
15541        sensor_id: 0_u8,
15542        quality: 0_u8,
15543    };
15544    #[cfg(feature = "arbitrary")]
15545    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15546        use arbitrary::{Arbitrary, Unstructured};
15547        let mut buf = [0u8; 1024];
15548        rng.fill_bytes(&mut buf);
15549        let mut unstructured = Unstructured::new(&buf);
15550        Self::arbitrary(&mut unstructured).unwrap_or_default()
15551    }
15552}
15553impl Default for HIL_OPTICAL_FLOW_DATA {
15554    fn default() -> Self {
15555        Self::DEFAULT.clone()
15556    }
15557}
15558impl MessageData for HIL_OPTICAL_FLOW_DATA {
15559    type Message = MavMessage;
15560    const ID: u32 = 114u32;
15561    const NAME: &'static str = "HIL_OPTICAL_FLOW";
15562    const EXTRA_CRC: u8 = 237u8;
15563    const ENCODED_LEN: usize = 44usize;
15564    fn deser(
15565        _version: MavlinkVersion,
15566        __input: &[u8],
15567    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15568        let avail_len = __input.len();
15569        let mut payload_buf = [0; Self::ENCODED_LEN];
15570        let mut buf = if avail_len < Self::ENCODED_LEN {
15571            payload_buf[0..avail_len].copy_from_slice(__input);
15572            Bytes::new(&payload_buf)
15573        } else {
15574            Bytes::new(__input)
15575        };
15576        let mut __struct = Self::default();
15577        __struct.time_usec = buf.get_u64_le();
15578        __struct.integration_time_us = buf.get_u32_le();
15579        __struct.integrated_x = buf.get_f32_le();
15580        __struct.integrated_y = buf.get_f32_le();
15581        __struct.integrated_xgyro = buf.get_f32_le();
15582        __struct.integrated_ygyro = buf.get_f32_le();
15583        __struct.integrated_zgyro = buf.get_f32_le();
15584        __struct.time_delta_distance_us = buf.get_u32_le();
15585        __struct.distance = buf.get_f32_le();
15586        __struct.temperature = buf.get_i16_le();
15587        __struct.sensor_id = buf.get_u8();
15588        __struct.quality = buf.get_u8();
15589        Ok(__struct)
15590    }
15591    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15592        let mut __tmp = BytesMut::new(bytes);
15593        #[allow(clippy::absurd_extreme_comparisons)]
15594        #[allow(unused_comparisons)]
15595        if __tmp.remaining() < Self::ENCODED_LEN {
15596            panic!(
15597                "buffer is too small (need {} bytes, but got {})",
15598                Self::ENCODED_LEN,
15599                __tmp.remaining(),
15600            )
15601        }
15602        __tmp.put_u64_le(self.time_usec);
15603        __tmp.put_u32_le(self.integration_time_us);
15604        __tmp.put_f32_le(self.integrated_x);
15605        __tmp.put_f32_le(self.integrated_y);
15606        __tmp.put_f32_le(self.integrated_xgyro);
15607        __tmp.put_f32_le(self.integrated_ygyro);
15608        __tmp.put_f32_le(self.integrated_zgyro);
15609        __tmp.put_u32_le(self.time_delta_distance_us);
15610        __tmp.put_f32_le(self.distance);
15611        __tmp.put_i16_le(self.temperature);
15612        __tmp.put_u8(self.sensor_id);
15613        __tmp.put_u8(self.quality);
15614        if matches!(version, MavlinkVersion::V2) {
15615            let len = __tmp.len();
15616            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15617        } else {
15618            __tmp.len()
15619        }
15620    }
15621}
15622#[doc = "id: 92"]
15623#[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
15624#[derive(Debug, Clone, PartialEq)]
15625#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15626#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15627pub struct HIL_RC_INPUTS_RAW_DATA {
15628    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15629    pub time_usec: u64,
15630    #[doc = "RC channel 1 value"]
15631    pub chan1_raw: u16,
15632    #[doc = "RC channel 2 value"]
15633    pub chan2_raw: u16,
15634    #[doc = "RC channel 3 value"]
15635    pub chan3_raw: u16,
15636    #[doc = "RC channel 4 value"]
15637    pub chan4_raw: u16,
15638    #[doc = "RC channel 5 value"]
15639    pub chan5_raw: u16,
15640    #[doc = "RC channel 6 value"]
15641    pub chan6_raw: u16,
15642    #[doc = "RC channel 7 value"]
15643    pub chan7_raw: u16,
15644    #[doc = "RC channel 8 value"]
15645    pub chan8_raw: u16,
15646    #[doc = "RC channel 9 value"]
15647    pub chan9_raw: u16,
15648    #[doc = "RC channel 10 value"]
15649    pub chan10_raw: u16,
15650    #[doc = "RC channel 11 value"]
15651    pub chan11_raw: u16,
15652    #[doc = "RC channel 12 value"]
15653    pub chan12_raw: u16,
15654    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
15655    pub rssi: u8,
15656}
15657impl HIL_RC_INPUTS_RAW_DATA {
15658    pub const ENCODED_LEN: usize = 33usize;
15659    pub const DEFAULT: Self = Self {
15660        time_usec: 0_u64,
15661        chan1_raw: 0_u16,
15662        chan2_raw: 0_u16,
15663        chan3_raw: 0_u16,
15664        chan4_raw: 0_u16,
15665        chan5_raw: 0_u16,
15666        chan6_raw: 0_u16,
15667        chan7_raw: 0_u16,
15668        chan8_raw: 0_u16,
15669        chan9_raw: 0_u16,
15670        chan10_raw: 0_u16,
15671        chan11_raw: 0_u16,
15672        chan12_raw: 0_u16,
15673        rssi: 0_u8,
15674    };
15675    #[cfg(feature = "arbitrary")]
15676    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15677        use arbitrary::{Arbitrary, Unstructured};
15678        let mut buf = [0u8; 1024];
15679        rng.fill_bytes(&mut buf);
15680        let mut unstructured = Unstructured::new(&buf);
15681        Self::arbitrary(&mut unstructured).unwrap_or_default()
15682    }
15683}
15684impl Default for HIL_RC_INPUTS_RAW_DATA {
15685    fn default() -> Self {
15686        Self::DEFAULT.clone()
15687    }
15688}
15689impl MessageData for HIL_RC_INPUTS_RAW_DATA {
15690    type Message = MavMessage;
15691    const ID: u32 = 92u32;
15692    const NAME: &'static str = "HIL_RC_INPUTS_RAW";
15693    const EXTRA_CRC: u8 = 54u8;
15694    const ENCODED_LEN: usize = 33usize;
15695    fn deser(
15696        _version: MavlinkVersion,
15697        __input: &[u8],
15698    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15699        let avail_len = __input.len();
15700        let mut payload_buf = [0; Self::ENCODED_LEN];
15701        let mut buf = if avail_len < Self::ENCODED_LEN {
15702            payload_buf[0..avail_len].copy_from_slice(__input);
15703            Bytes::new(&payload_buf)
15704        } else {
15705            Bytes::new(__input)
15706        };
15707        let mut __struct = Self::default();
15708        __struct.time_usec = buf.get_u64_le();
15709        __struct.chan1_raw = buf.get_u16_le();
15710        __struct.chan2_raw = buf.get_u16_le();
15711        __struct.chan3_raw = buf.get_u16_le();
15712        __struct.chan4_raw = buf.get_u16_le();
15713        __struct.chan5_raw = buf.get_u16_le();
15714        __struct.chan6_raw = buf.get_u16_le();
15715        __struct.chan7_raw = buf.get_u16_le();
15716        __struct.chan8_raw = buf.get_u16_le();
15717        __struct.chan9_raw = buf.get_u16_le();
15718        __struct.chan10_raw = buf.get_u16_le();
15719        __struct.chan11_raw = buf.get_u16_le();
15720        __struct.chan12_raw = buf.get_u16_le();
15721        __struct.rssi = buf.get_u8();
15722        Ok(__struct)
15723    }
15724    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15725        let mut __tmp = BytesMut::new(bytes);
15726        #[allow(clippy::absurd_extreme_comparisons)]
15727        #[allow(unused_comparisons)]
15728        if __tmp.remaining() < Self::ENCODED_LEN {
15729            panic!(
15730                "buffer is too small (need {} bytes, but got {})",
15731                Self::ENCODED_LEN,
15732                __tmp.remaining(),
15733            )
15734        }
15735        __tmp.put_u64_le(self.time_usec);
15736        __tmp.put_u16_le(self.chan1_raw);
15737        __tmp.put_u16_le(self.chan2_raw);
15738        __tmp.put_u16_le(self.chan3_raw);
15739        __tmp.put_u16_le(self.chan4_raw);
15740        __tmp.put_u16_le(self.chan5_raw);
15741        __tmp.put_u16_le(self.chan6_raw);
15742        __tmp.put_u16_le(self.chan7_raw);
15743        __tmp.put_u16_le(self.chan8_raw);
15744        __tmp.put_u16_le(self.chan9_raw);
15745        __tmp.put_u16_le(self.chan10_raw);
15746        __tmp.put_u16_le(self.chan11_raw);
15747        __tmp.put_u16_le(self.chan12_raw);
15748        __tmp.put_u8(self.rssi);
15749        if matches!(version, MavlinkVersion::V2) {
15750            let len = __tmp.len();
15751            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15752        } else {
15753            __tmp.len()
15754        }
15755    }
15756}
15757#[doc = "id: 107"]
15758#[doc = "The IMU readings in SI units in NED body frame."]
15759#[derive(Debug, Clone, PartialEq)]
15760#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15761#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15762pub struct HIL_SENSOR_DATA {
15763    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15764    pub time_usec: u64,
15765    #[doc = "X acceleration"]
15766    pub xacc: f32,
15767    #[doc = "Y acceleration"]
15768    pub yacc: f32,
15769    #[doc = "Z acceleration"]
15770    pub zacc: f32,
15771    #[doc = "Angular speed around X axis in body frame"]
15772    pub xgyro: f32,
15773    #[doc = "Angular speed around Y axis in body frame"]
15774    pub ygyro: f32,
15775    #[doc = "Angular speed around Z axis in body frame"]
15776    pub zgyro: f32,
15777    #[doc = "X Magnetic field"]
15778    pub xmag: f32,
15779    #[doc = "Y Magnetic field"]
15780    pub ymag: f32,
15781    #[doc = "Z Magnetic field"]
15782    pub zmag: f32,
15783    #[doc = "Absolute pressure"]
15784    pub abs_pressure: f32,
15785    #[doc = "Differential pressure (airspeed)"]
15786    pub diff_pressure: f32,
15787    #[doc = "Altitude calculated from pressure"]
15788    pub pressure_alt: f32,
15789    #[doc = "Temperature"]
15790    pub temperature: f32,
15791    #[doc = "Bitmap for fields that have updated since last message"]
15792    pub fields_updated: HilSensorUpdatedFlags,
15793    #[doc = "Sensor ID (zero indexed). Used for multiple sensor inputs"]
15794    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15795    pub id: u8,
15796}
15797impl HIL_SENSOR_DATA {
15798    pub const ENCODED_LEN: usize = 65usize;
15799    pub const DEFAULT: Self = Self {
15800        time_usec: 0_u64,
15801        xacc: 0.0_f32,
15802        yacc: 0.0_f32,
15803        zacc: 0.0_f32,
15804        xgyro: 0.0_f32,
15805        ygyro: 0.0_f32,
15806        zgyro: 0.0_f32,
15807        xmag: 0.0_f32,
15808        ymag: 0.0_f32,
15809        zmag: 0.0_f32,
15810        abs_pressure: 0.0_f32,
15811        diff_pressure: 0.0_f32,
15812        pressure_alt: 0.0_f32,
15813        temperature: 0.0_f32,
15814        fields_updated: HilSensorUpdatedFlags::DEFAULT,
15815        id: 0_u8,
15816    };
15817    #[cfg(feature = "arbitrary")]
15818    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15819        use arbitrary::{Arbitrary, Unstructured};
15820        let mut buf = [0u8; 1024];
15821        rng.fill_bytes(&mut buf);
15822        let mut unstructured = Unstructured::new(&buf);
15823        Self::arbitrary(&mut unstructured).unwrap_or_default()
15824    }
15825}
15826impl Default for HIL_SENSOR_DATA {
15827    fn default() -> Self {
15828        Self::DEFAULT.clone()
15829    }
15830}
15831impl MessageData for HIL_SENSOR_DATA {
15832    type Message = MavMessage;
15833    const ID: u32 = 107u32;
15834    const NAME: &'static str = "HIL_SENSOR";
15835    const EXTRA_CRC: u8 = 108u8;
15836    const ENCODED_LEN: usize = 65usize;
15837    fn deser(
15838        _version: MavlinkVersion,
15839        __input: &[u8],
15840    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15841        let avail_len = __input.len();
15842        let mut payload_buf = [0; Self::ENCODED_LEN];
15843        let mut buf = if avail_len < Self::ENCODED_LEN {
15844            payload_buf[0..avail_len].copy_from_slice(__input);
15845            Bytes::new(&payload_buf)
15846        } else {
15847            Bytes::new(__input)
15848        };
15849        let mut __struct = Self::default();
15850        __struct.time_usec = buf.get_u64_le();
15851        __struct.xacc = buf.get_f32_le();
15852        __struct.yacc = buf.get_f32_le();
15853        __struct.zacc = buf.get_f32_le();
15854        __struct.xgyro = buf.get_f32_le();
15855        __struct.ygyro = buf.get_f32_le();
15856        __struct.zgyro = buf.get_f32_le();
15857        __struct.xmag = buf.get_f32_le();
15858        __struct.ymag = buf.get_f32_le();
15859        __struct.zmag = buf.get_f32_le();
15860        __struct.abs_pressure = buf.get_f32_le();
15861        __struct.diff_pressure = buf.get_f32_le();
15862        __struct.pressure_alt = buf.get_f32_le();
15863        __struct.temperature = buf.get_f32_le();
15864        let tmp = buf.get_u32_le();
15865        __struct.fields_updated = HilSensorUpdatedFlags::from_bits(
15866            tmp & HilSensorUpdatedFlags::all().bits(),
15867        )
15868        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15869            flag_type: "HilSensorUpdatedFlags",
15870            value: tmp as u32,
15871        })?;
15872        __struct.id = buf.get_u8();
15873        Ok(__struct)
15874    }
15875    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15876        let mut __tmp = BytesMut::new(bytes);
15877        #[allow(clippy::absurd_extreme_comparisons)]
15878        #[allow(unused_comparisons)]
15879        if __tmp.remaining() < Self::ENCODED_LEN {
15880            panic!(
15881                "buffer is too small (need {} bytes, but got {})",
15882                Self::ENCODED_LEN,
15883                __tmp.remaining(),
15884            )
15885        }
15886        __tmp.put_u64_le(self.time_usec);
15887        __tmp.put_f32_le(self.xacc);
15888        __tmp.put_f32_le(self.yacc);
15889        __tmp.put_f32_le(self.zacc);
15890        __tmp.put_f32_le(self.xgyro);
15891        __tmp.put_f32_le(self.ygyro);
15892        __tmp.put_f32_le(self.zgyro);
15893        __tmp.put_f32_le(self.xmag);
15894        __tmp.put_f32_le(self.ymag);
15895        __tmp.put_f32_le(self.zmag);
15896        __tmp.put_f32_le(self.abs_pressure);
15897        __tmp.put_f32_le(self.diff_pressure);
15898        __tmp.put_f32_le(self.pressure_alt);
15899        __tmp.put_f32_le(self.temperature);
15900        __tmp.put_u32_le(self.fields_updated.bits());
15901        __tmp.put_u8(self.id);
15902        if matches!(version, MavlinkVersion::V2) {
15903            let len = __tmp.len();
15904            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15905        } else {
15906            __tmp.len()
15907        }
15908    }
15909}
15910#[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
15911#[doc = "id: 90"]
15912#[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
15913#[derive(Debug, Clone, PartialEq)]
15914#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15915#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15916pub struct HIL_STATE_DATA {
15917    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15918    pub time_usec: u64,
15919    #[doc = "Roll angle"]
15920    pub roll: f32,
15921    #[doc = "Pitch angle"]
15922    pub pitch: f32,
15923    #[doc = "Yaw angle"]
15924    pub yaw: f32,
15925    #[doc = "Body frame roll / phi angular speed"]
15926    pub rollspeed: f32,
15927    #[doc = "Body frame pitch / theta angular speed"]
15928    pub pitchspeed: f32,
15929    #[doc = "Body frame yaw / psi angular speed"]
15930    pub yawspeed: f32,
15931    #[doc = "Latitude"]
15932    pub lat: i32,
15933    #[doc = "Longitude"]
15934    pub lon: i32,
15935    #[doc = "Altitude"]
15936    pub alt: i32,
15937    #[doc = "Ground X Speed (Latitude)"]
15938    pub vx: i16,
15939    #[doc = "Ground Y Speed (Longitude)"]
15940    pub vy: i16,
15941    #[doc = "Ground Z Speed (Altitude)"]
15942    pub vz: i16,
15943    #[doc = "X acceleration"]
15944    pub xacc: i16,
15945    #[doc = "Y acceleration"]
15946    pub yacc: i16,
15947    #[doc = "Z acceleration"]
15948    pub zacc: i16,
15949}
15950impl HIL_STATE_DATA {
15951    pub const ENCODED_LEN: usize = 56usize;
15952    pub const DEFAULT: Self = Self {
15953        time_usec: 0_u64,
15954        roll: 0.0_f32,
15955        pitch: 0.0_f32,
15956        yaw: 0.0_f32,
15957        rollspeed: 0.0_f32,
15958        pitchspeed: 0.0_f32,
15959        yawspeed: 0.0_f32,
15960        lat: 0_i32,
15961        lon: 0_i32,
15962        alt: 0_i32,
15963        vx: 0_i16,
15964        vy: 0_i16,
15965        vz: 0_i16,
15966        xacc: 0_i16,
15967        yacc: 0_i16,
15968        zacc: 0_i16,
15969    };
15970    #[cfg(feature = "arbitrary")]
15971    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15972        use arbitrary::{Arbitrary, Unstructured};
15973        let mut buf = [0u8; 1024];
15974        rng.fill_bytes(&mut buf);
15975        let mut unstructured = Unstructured::new(&buf);
15976        Self::arbitrary(&mut unstructured).unwrap_or_default()
15977    }
15978}
15979impl Default for HIL_STATE_DATA {
15980    fn default() -> Self {
15981        Self::DEFAULT.clone()
15982    }
15983}
15984impl MessageData for HIL_STATE_DATA {
15985    type Message = MavMessage;
15986    const ID: u32 = 90u32;
15987    const NAME: &'static str = "HIL_STATE";
15988    const EXTRA_CRC: u8 = 183u8;
15989    const ENCODED_LEN: usize = 56usize;
15990    fn deser(
15991        _version: MavlinkVersion,
15992        __input: &[u8],
15993    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15994        let avail_len = __input.len();
15995        let mut payload_buf = [0; Self::ENCODED_LEN];
15996        let mut buf = if avail_len < Self::ENCODED_LEN {
15997            payload_buf[0..avail_len].copy_from_slice(__input);
15998            Bytes::new(&payload_buf)
15999        } else {
16000            Bytes::new(__input)
16001        };
16002        let mut __struct = Self::default();
16003        __struct.time_usec = buf.get_u64_le();
16004        __struct.roll = buf.get_f32_le();
16005        __struct.pitch = buf.get_f32_le();
16006        __struct.yaw = buf.get_f32_le();
16007        __struct.rollspeed = buf.get_f32_le();
16008        __struct.pitchspeed = buf.get_f32_le();
16009        __struct.yawspeed = buf.get_f32_le();
16010        __struct.lat = buf.get_i32_le();
16011        __struct.lon = buf.get_i32_le();
16012        __struct.alt = buf.get_i32_le();
16013        __struct.vx = buf.get_i16_le();
16014        __struct.vy = buf.get_i16_le();
16015        __struct.vz = buf.get_i16_le();
16016        __struct.xacc = buf.get_i16_le();
16017        __struct.yacc = buf.get_i16_le();
16018        __struct.zacc = buf.get_i16_le();
16019        Ok(__struct)
16020    }
16021    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16022        let mut __tmp = BytesMut::new(bytes);
16023        #[allow(clippy::absurd_extreme_comparisons)]
16024        #[allow(unused_comparisons)]
16025        if __tmp.remaining() < Self::ENCODED_LEN {
16026            panic!(
16027                "buffer is too small (need {} bytes, but got {})",
16028                Self::ENCODED_LEN,
16029                __tmp.remaining(),
16030            )
16031        }
16032        __tmp.put_u64_le(self.time_usec);
16033        __tmp.put_f32_le(self.roll);
16034        __tmp.put_f32_le(self.pitch);
16035        __tmp.put_f32_le(self.yaw);
16036        __tmp.put_f32_le(self.rollspeed);
16037        __tmp.put_f32_le(self.pitchspeed);
16038        __tmp.put_f32_le(self.yawspeed);
16039        __tmp.put_i32_le(self.lat);
16040        __tmp.put_i32_le(self.lon);
16041        __tmp.put_i32_le(self.alt);
16042        __tmp.put_i16_le(self.vx);
16043        __tmp.put_i16_le(self.vy);
16044        __tmp.put_i16_le(self.vz);
16045        __tmp.put_i16_le(self.xacc);
16046        __tmp.put_i16_le(self.yacc);
16047        __tmp.put_i16_le(self.zacc);
16048        if matches!(version, MavlinkVersion::V2) {
16049            let len = __tmp.len();
16050            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16051        } else {
16052            __tmp.len()
16053        }
16054    }
16055}
16056#[doc = "id: 115"]
16057#[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
16058#[derive(Debug, Clone, PartialEq)]
16059#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16060#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16061pub struct HIL_STATE_QUATERNION_DATA {
16062    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16063    pub time_usec: u64,
16064    #[doc = "Vehicle attitude expressed as normalized quaternion in w, x, y, z order (with 1 0 0 0 being the null-rotation)"]
16065    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16066    pub attitude_quaternion: [f32; 4],
16067    #[doc = "Body frame roll / phi angular speed"]
16068    pub rollspeed: f32,
16069    #[doc = "Body frame pitch / theta angular speed"]
16070    pub pitchspeed: f32,
16071    #[doc = "Body frame yaw / psi angular speed"]
16072    pub yawspeed: f32,
16073    #[doc = "Latitude"]
16074    pub lat: i32,
16075    #[doc = "Longitude"]
16076    pub lon: i32,
16077    #[doc = "Altitude"]
16078    pub alt: i32,
16079    #[doc = "Ground X Speed (Latitude)"]
16080    pub vx: i16,
16081    #[doc = "Ground Y Speed (Longitude)"]
16082    pub vy: i16,
16083    #[doc = "Ground Z Speed (Altitude)"]
16084    pub vz: i16,
16085    #[doc = "Indicated airspeed"]
16086    pub ind_airspeed: u16,
16087    #[doc = "True airspeed"]
16088    pub true_airspeed: u16,
16089    #[doc = "X acceleration"]
16090    pub xacc: i16,
16091    #[doc = "Y acceleration"]
16092    pub yacc: i16,
16093    #[doc = "Z acceleration"]
16094    pub zacc: i16,
16095}
16096impl HIL_STATE_QUATERNION_DATA {
16097    pub const ENCODED_LEN: usize = 64usize;
16098    pub const DEFAULT: Self = Self {
16099        time_usec: 0_u64,
16100        attitude_quaternion: [0.0_f32; 4usize],
16101        rollspeed: 0.0_f32,
16102        pitchspeed: 0.0_f32,
16103        yawspeed: 0.0_f32,
16104        lat: 0_i32,
16105        lon: 0_i32,
16106        alt: 0_i32,
16107        vx: 0_i16,
16108        vy: 0_i16,
16109        vz: 0_i16,
16110        ind_airspeed: 0_u16,
16111        true_airspeed: 0_u16,
16112        xacc: 0_i16,
16113        yacc: 0_i16,
16114        zacc: 0_i16,
16115    };
16116    #[cfg(feature = "arbitrary")]
16117    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16118        use arbitrary::{Arbitrary, Unstructured};
16119        let mut buf = [0u8; 1024];
16120        rng.fill_bytes(&mut buf);
16121        let mut unstructured = Unstructured::new(&buf);
16122        Self::arbitrary(&mut unstructured).unwrap_or_default()
16123    }
16124}
16125impl Default for HIL_STATE_QUATERNION_DATA {
16126    fn default() -> Self {
16127        Self::DEFAULT.clone()
16128    }
16129}
16130impl MessageData for HIL_STATE_QUATERNION_DATA {
16131    type Message = MavMessage;
16132    const ID: u32 = 115u32;
16133    const NAME: &'static str = "HIL_STATE_QUATERNION";
16134    const EXTRA_CRC: u8 = 4u8;
16135    const ENCODED_LEN: usize = 64usize;
16136    fn deser(
16137        _version: MavlinkVersion,
16138        __input: &[u8],
16139    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16140        let avail_len = __input.len();
16141        let mut payload_buf = [0; Self::ENCODED_LEN];
16142        let mut buf = if avail_len < Self::ENCODED_LEN {
16143            payload_buf[0..avail_len].copy_from_slice(__input);
16144            Bytes::new(&payload_buf)
16145        } else {
16146            Bytes::new(__input)
16147        };
16148        let mut __struct = Self::default();
16149        __struct.time_usec = buf.get_u64_le();
16150        for v in &mut __struct.attitude_quaternion {
16151            let val = buf.get_f32_le();
16152            *v = val;
16153        }
16154        __struct.rollspeed = buf.get_f32_le();
16155        __struct.pitchspeed = buf.get_f32_le();
16156        __struct.yawspeed = buf.get_f32_le();
16157        __struct.lat = buf.get_i32_le();
16158        __struct.lon = buf.get_i32_le();
16159        __struct.alt = buf.get_i32_le();
16160        __struct.vx = buf.get_i16_le();
16161        __struct.vy = buf.get_i16_le();
16162        __struct.vz = buf.get_i16_le();
16163        __struct.ind_airspeed = buf.get_u16_le();
16164        __struct.true_airspeed = buf.get_u16_le();
16165        __struct.xacc = buf.get_i16_le();
16166        __struct.yacc = buf.get_i16_le();
16167        __struct.zacc = buf.get_i16_le();
16168        Ok(__struct)
16169    }
16170    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16171        let mut __tmp = BytesMut::new(bytes);
16172        #[allow(clippy::absurd_extreme_comparisons)]
16173        #[allow(unused_comparisons)]
16174        if __tmp.remaining() < Self::ENCODED_LEN {
16175            panic!(
16176                "buffer is too small (need {} bytes, but got {})",
16177                Self::ENCODED_LEN,
16178                __tmp.remaining(),
16179            )
16180        }
16181        __tmp.put_u64_le(self.time_usec);
16182        for val in &self.attitude_quaternion {
16183            __tmp.put_f32_le(*val);
16184        }
16185        __tmp.put_f32_le(self.rollspeed);
16186        __tmp.put_f32_le(self.pitchspeed);
16187        __tmp.put_f32_le(self.yawspeed);
16188        __tmp.put_i32_le(self.lat);
16189        __tmp.put_i32_le(self.lon);
16190        __tmp.put_i32_le(self.alt);
16191        __tmp.put_i16_le(self.vx);
16192        __tmp.put_i16_le(self.vy);
16193        __tmp.put_i16_le(self.vz);
16194        __tmp.put_u16_le(self.ind_airspeed);
16195        __tmp.put_u16_le(self.true_airspeed);
16196        __tmp.put_i16_le(self.xacc);
16197        __tmp.put_i16_le(self.yacc);
16198        __tmp.put_i16_le(self.zacc);
16199        if matches!(version, MavlinkVersion::V2) {
16200            let len = __tmp.len();
16201            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16202        } else {
16203            __tmp.len()
16204        }
16205    }
16206}
16207#[doc = "id: 242"]
16208#[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
16209#[derive(Debug, Clone, PartialEq)]
16210#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16211#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16212pub struct HOME_POSITION_DATA {
16213    #[doc = "Latitude (WGS84)"]
16214    pub latitude: i32,
16215    #[doc = "Longitude (WGS84)"]
16216    pub longitude: i32,
16217    #[doc = "Altitude (MSL). Positive for up."]
16218    pub altitude: i32,
16219    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
16220    pub x: f32,
16221    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
16222    pub y: f32,
16223    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
16224    pub z: f32,
16225    #[doc = "Quaternion indicating world-to-surface-normal and heading transformation of the takeoff position.         Used to indicate the heading and slope of the ground.         All fields should be set to NaN if an accurate quaternion for both heading and surface slope cannot be supplied."]
16226    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16227    pub q: [f32; 4],
16228    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
16229    pub approach_x: f32,
16230    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
16231    pub approach_y: f32,
16232    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
16233    pub approach_z: f32,
16234    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16235    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16236    pub time_usec: u64,
16237}
16238impl HOME_POSITION_DATA {
16239    pub const ENCODED_LEN: usize = 60usize;
16240    pub const DEFAULT: Self = Self {
16241        latitude: 0_i32,
16242        longitude: 0_i32,
16243        altitude: 0_i32,
16244        x: 0.0_f32,
16245        y: 0.0_f32,
16246        z: 0.0_f32,
16247        q: [0.0_f32; 4usize],
16248        approach_x: 0.0_f32,
16249        approach_y: 0.0_f32,
16250        approach_z: 0.0_f32,
16251        time_usec: 0_u64,
16252    };
16253    #[cfg(feature = "arbitrary")]
16254    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16255        use arbitrary::{Arbitrary, Unstructured};
16256        let mut buf = [0u8; 1024];
16257        rng.fill_bytes(&mut buf);
16258        let mut unstructured = Unstructured::new(&buf);
16259        Self::arbitrary(&mut unstructured).unwrap_or_default()
16260    }
16261}
16262impl Default for HOME_POSITION_DATA {
16263    fn default() -> Self {
16264        Self::DEFAULT.clone()
16265    }
16266}
16267impl MessageData for HOME_POSITION_DATA {
16268    type Message = MavMessage;
16269    const ID: u32 = 242u32;
16270    const NAME: &'static str = "HOME_POSITION";
16271    const EXTRA_CRC: u8 = 104u8;
16272    const ENCODED_LEN: usize = 60usize;
16273    fn deser(
16274        _version: MavlinkVersion,
16275        __input: &[u8],
16276    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16277        let avail_len = __input.len();
16278        let mut payload_buf = [0; Self::ENCODED_LEN];
16279        let mut buf = if avail_len < Self::ENCODED_LEN {
16280            payload_buf[0..avail_len].copy_from_slice(__input);
16281            Bytes::new(&payload_buf)
16282        } else {
16283            Bytes::new(__input)
16284        };
16285        let mut __struct = Self::default();
16286        __struct.latitude = buf.get_i32_le();
16287        __struct.longitude = buf.get_i32_le();
16288        __struct.altitude = buf.get_i32_le();
16289        __struct.x = buf.get_f32_le();
16290        __struct.y = buf.get_f32_le();
16291        __struct.z = buf.get_f32_le();
16292        for v in &mut __struct.q {
16293            let val = buf.get_f32_le();
16294            *v = val;
16295        }
16296        __struct.approach_x = buf.get_f32_le();
16297        __struct.approach_y = buf.get_f32_le();
16298        __struct.approach_z = buf.get_f32_le();
16299        __struct.time_usec = buf.get_u64_le();
16300        Ok(__struct)
16301    }
16302    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16303        let mut __tmp = BytesMut::new(bytes);
16304        #[allow(clippy::absurd_extreme_comparisons)]
16305        #[allow(unused_comparisons)]
16306        if __tmp.remaining() < Self::ENCODED_LEN {
16307            panic!(
16308                "buffer is too small (need {} bytes, but got {})",
16309                Self::ENCODED_LEN,
16310                __tmp.remaining(),
16311            )
16312        }
16313        __tmp.put_i32_le(self.latitude);
16314        __tmp.put_i32_le(self.longitude);
16315        __tmp.put_i32_le(self.altitude);
16316        __tmp.put_f32_le(self.x);
16317        __tmp.put_f32_le(self.y);
16318        __tmp.put_f32_le(self.z);
16319        for val in &self.q {
16320            __tmp.put_f32_le(*val);
16321        }
16322        __tmp.put_f32_le(self.approach_x);
16323        __tmp.put_f32_le(self.approach_y);
16324        __tmp.put_f32_le(self.approach_z);
16325        __tmp.put_u64_le(self.time_usec);
16326        if matches!(version, MavlinkVersion::V2) {
16327            let len = __tmp.len();
16328            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16329        } else {
16330            __tmp.len()
16331        }
16332    }
16333}
16334#[doc = "id: 12920"]
16335#[doc = "Temperature and humidity from hygrometer."]
16336#[derive(Debug, Clone, PartialEq)]
16337#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16338#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16339pub struct HYGROMETER_SENSOR_DATA {
16340    #[doc = "Temperature"]
16341    pub temperature: i16,
16342    #[doc = "Humidity"]
16343    pub humidity: u16,
16344    #[doc = "Hygrometer ID"]
16345    pub id: u8,
16346}
16347impl HYGROMETER_SENSOR_DATA {
16348    pub const ENCODED_LEN: usize = 5usize;
16349    pub const DEFAULT: Self = Self {
16350        temperature: 0_i16,
16351        humidity: 0_u16,
16352        id: 0_u8,
16353    };
16354    #[cfg(feature = "arbitrary")]
16355    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16356        use arbitrary::{Arbitrary, Unstructured};
16357        let mut buf = [0u8; 1024];
16358        rng.fill_bytes(&mut buf);
16359        let mut unstructured = Unstructured::new(&buf);
16360        Self::arbitrary(&mut unstructured).unwrap_or_default()
16361    }
16362}
16363impl Default for HYGROMETER_SENSOR_DATA {
16364    fn default() -> Self {
16365        Self::DEFAULT.clone()
16366    }
16367}
16368impl MessageData for HYGROMETER_SENSOR_DATA {
16369    type Message = MavMessage;
16370    const ID: u32 = 12920u32;
16371    const NAME: &'static str = "HYGROMETER_SENSOR";
16372    const EXTRA_CRC: u8 = 20u8;
16373    const ENCODED_LEN: usize = 5usize;
16374    fn deser(
16375        _version: MavlinkVersion,
16376        __input: &[u8],
16377    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16378        let avail_len = __input.len();
16379        let mut payload_buf = [0; Self::ENCODED_LEN];
16380        let mut buf = if avail_len < Self::ENCODED_LEN {
16381            payload_buf[0..avail_len].copy_from_slice(__input);
16382            Bytes::new(&payload_buf)
16383        } else {
16384            Bytes::new(__input)
16385        };
16386        let mut __struct = Self::default();
16387        __struct.temperature = buf.get_i16_le();
16388        __struct.humidity = buf.get_u16_le();
16389        __struct.id = buf.get_u8();
16390        Ok(__struct)
16391    }
16392    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16393        let mut __tmp = BytesMut::new(bytes);
16394        #[allow(clippy::absurd_extreme_comparisons)]
16395        #[allow(unused_comparisons)]
16396        if __tmp.remaining() < Self::ENCODED_LEN {
16397            panic!(
16398                "buffer is too small (need {} bytes, but got {})",
16399                Self::ENCODED_LEN,
16400                __tmp.remaining(),
16401            )
16402        }
16403        __tmp.put_i16_le(self.temperature);
16404        __tmp.put_u16_le(self.humidity);
16405        __tmp.put_u8(self.id);
16406        if matches!(version, MavlinkVersion::V2) {
16407            let len = __tmp.len();
16408            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16409        } else {
16410            __tmp.len()
16411        }
16412    }
16413}
16414#[doc = "id: 440"]
16415#[doc = "Illuminator status."]
16416#[derive(Debug, Clone, PartialEq)]
16417#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16418#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16419pub struct ILLUMINATOR_STATUS_DATA {
16420    #[doc = "Time since the start-up of the illuminator in ms"]
16421    pub uptime_ms: u32,
16422    #[doc = "Errors"]
16423    pub error_status: IlluminatorErrorFlags,
16424    #[doc = "Illuminator brightness"]
16425    pub brightness: f32,
16426    #[doc = "Illuminator strobing period in seconds"]
16427    pub strobe_period: f32,
16428    #[doc = "Illuminator strobing duty cycle"]
16429    pub strobe_duty_cycle: f32,
16430    #[doc = "Temperature in Celsius"]
16431    pub temp_c: f32,
16432    #[doc = "Minimum strobing period in seconds"]
16433    pub min_strobe_period: f32,
16434    #[doc = "Maximum strobing period in seconds"]
16435    pub max_strobe_period: f32,
16436    #[doc = "0: Illuminators OFF, 1: Illuminators ON"]
16437    pub enable: u8,
16438    #[doc = "Supported illuminator modes"]
16439    pub mode_bitmask: IlluminatorMode,
16440    #[doc = "Illuminator mode"]
16441    pub mode: IlluminatorMode,
16442}
16443impl ILLUMINATOR_STATUS_DATA {
16444    pub const ENCODED_LEN: usize = 35usize;
16445    pub const DEFAULT: Self = Self {
16446        uptime_ms: 0_u32,
16447        error_status: IlluminatorErrorFlags::DEFAULT,
16448        brightness: 0.0_f32,
16449        strobe_period: 0.0_f32,
16450        strobe_duty_cycle: 0.0_f32,
16451        temp_c: 0.0_f32,
16452        min_strobe_period: 0.0_f32,
16453        max_strobe_period: 0.0_f32,
16454        enable: 0_u8,
16455        mode_bitmask: IlluminatorMode::DEFAULT,
16456        mode: IlluminatorMode::DEFAULT,
16457    };
16458    #[cfg(feature = "arbitrary")]
16459    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16460        use arbitrary::{Arbitrary, Unstructured};
16461        let mut buf = [0u8; 1024];
16462        rng.fill_bytes(&mut buf);
16463        let mut unstructured = Unstructured::new(&buf);
16464        Self::arbitrary(&mut unstructured).unwrap_or_default()
16465    }
16466}
16467impl Default for ILLUMINATOR_STATUS_DATA {
16468    fn default() -> Self {
16469        Self::DEFAULT.clone()
16470    }
16471}
16472impl MessageData for ILLUMINATOR_STATUS_DATA {
16473    type Message = MavMessage;
16474    const ID: u32 = 440u32;
16475    const NAME: &'static str = "ILLUMINATOR_STATUS";
16476    const EXTRA_CRC: u8 = 66u8;
16477    const ENCODED_LEN: usize = 35usize;
16478    fn deser(
16479        _version: MavlinkVersion,
16480        __input: &[u8],
16481    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16482        let avail_len = __input.len();
16483        let mut payload_buf = [0; Self::ENCODED_LEN];
16484        let mut buf = if avail_len < Self::ENCODED_LEN {
16485            payload_buf[0..avail_len].copy_from_slice(__input);
16486            Bytes::new(&payload_buf)
16487        } else {
16488            Bytes::new(__input)
16489        };
16490        let mut __struct = Self::default();
16491        __struct.uptime_ms = buf.get_u32_le();
16492        let tmp = buf.get_u32_le();
16493        __struct.error_status = IlluminatorErrorFlags::from_bits(
16494            tmp & IlluminatorErrorFlags::all().bits(),
16495        )
16496        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16497            flag_type: "IlluminatorErrorFlags",
16498            value: tmp as u32,
16499        })?;
16500        __struct.brightness = buf.get_f32_le();
16501        __struct.strobe_period = buf.get_f32_le();
16502        __struct.strobe_duty_cycle = buf.get_f32_le();
16503        __struct.temp_c = buf.get_f32_le();
16504        __struct.min_strobe_period = buf.get_f32_le();
16505        __struct.max_strobe_period = buf.get_f32_le();
16506        __struct.enable = buf.get_u8();
16507        let tmp = buf.get_u8();
16508        __struct.mode_bitmask =
16509            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16510                enum_type: "IlluminatorMode",
16511                value: tmp as u32,
16512            })?;
16513        let tmp = buf.get_u8();
16514        __struct.mode =
16515            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16516                enum_type: "IlluminatorMode",
16517                value: tmp as u32,
16518            })?;
16519        Ok(__struct)
16520    }
16521    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16522        let mut __tmp = BytesMut::new(bytes);
16523        #[allow(clippy::absurd_extreme_comparisons)]
16524        #[allow(unused_comparisons)]
16525        if __tmp.remaining() < Self::ENCODED_LEN {
16526            panic!(
16527                "buffer is too small (need {} bytes, but got {})",
16528                Self::ENCODED_LEN,
16529                __tmp.remaining(),
16530            )
16531        }
16532        __tmp.put_u32_le(self.uptime_ms);
16533        __tmp.put_u32_le(self.error_status.bits());
16534        __tmp.put_f32_le(self.brightness);
16535        __tmp.put_f32_le(self.strobe_period);
16536        __tmp.put_f32_le(self.strobe_duty_cycle);
16537        __tmp.put_f32_le(self.temp_c);
16538        __tmp.put_f32_le(self.min_strobe_period);
16539        __tmp.put_f32_le(self.max_strobe_period);
16540        __tmp.put_u8(self.enable);
16541        __tmp.put_u8(self.mode_bitmask as u8);
16542        __tmp.put_u8(self.mode as u8);
16543        if matches!(version, MavlinkVersion::V2) {
16544            let len = __tmp.len();
16545            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16546        } else {
16547            __tmp.len()
16548        }
16549    }
16550}
16551#[doc = "id: 335"]
16552#[doc = "Status of the Iridium SBD link."]
16553#[derive(Debug, Clone, PartialEq)]
16554#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16555#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16556pub struct ISBD_LINK_STATUS_DATA {
16557    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16558    pub timestamp: u64,
16559    #[doc = "Timestamp of the last successful sbd session. The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16560    pub last_heartbeat: u64,
16561    #[doc = "Number of failed SBD sessions."]
16562    pub failed_sessions: u16,
16563    #[doc = "Number of successful SBD sessions."]
16564    pub successful_sessions: u16,
16565    #[doc = "Signal quality equal to the number of bars displayed on the ISU signal strength indicator. Range is 0 to 5, where 0 indicates no signal and 5 indicates maximum signal strength."]
16566    pub signal_quality: u8,
16567    #[doc = "1: Ring call pending, 0: No call pending."]
16568    pub ring_pending: u8,
16569    #[doc = "1: Transmission session pending, 0: No transmission session pending."]
16570    pub tx_session_pending: u8,
16571    #[doc = "1: Receiving session pending, 0: No receiving session pending."]
16572    pub rx_session_pending: u8,
16573}
16574impl ISBD_LINK_STATUS_DATA {
16575    pub const ENCODED_LEN: usize = 24usize;
16576    pub const DEFAULT: Self = Self {
16577        timestamp: 0_u64,
16578        last_heartbeat: 0_u64,
16579        failed_sessions: 0_u16,
16580        successful_sessions: 0_u16,
16581        signal_quality: 0_u8,
16582        ring_pending: 0_u8,
16583        tx_session_pending: 0_u8,
16584        rx_session_pending: 0_u8,
16585    };
16586    #[cfg(feature = "arbitrary")]
16587    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16588        use arbitrary::{Arbitrary, Unstructured};
16589        let mut buf = [0u8; 1024];
16590        rng.fill_bytes(&mut buf);
16591        let mut unstructured = Unstructured::new(&buf);
16592        Self::arbitrary(&mut unstructured).unwrap_or_default()
16593    }
16594}
16595impl Default for ISBD_LINK_STATUS_DATA {
16596    fn default() -> Self {
16597        Self::DEFAULT.clone()
16598    }
16599}
16600impl MessageData for ISBD_LINK_STATUS_DATA {
16601    type Message = MavMessage;
16602    const ID: u32 = 335u32;
16603    const NAME: &'static str = "ISBD_LINK_STATUS";
16604    const EXTRA_CRC: u8 = 225u8;
16605    const ENCODED_LEN: usize = 24usize;
16606    fn deser(
16607        _version: MavlinkVersion,
16608        __input: &[u8],
16609    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16610        let avail_len = __input.len();
16611        let mut payload_buf = [0; Self::ENCODED_LEN];
16612        let mut buf = if avail_len < Self::ENCODED_LEN {
16613            payload_buf[0..avail_len].copy_from_slice(__input);
16614            Bytes::new(&payload_buf)
16615        } else {
16616            Bytes::new(__input)
16617        };
16618        let mut __struct = Self::default();
16619        __struct.timestamp = buf.get_u64_le();
16620        __struct.last_heartbeat = buf.get_u64_le();
16621        __struct.failed_sessions = buf.get_u16_le();
16622        __struct.successful_sessions = buf.get_u16_le();
16623        __struct.signal_quality = buf.get_u8();
16624        __struct.ring_pending = buf.get_u8();
16625        __struct.tx_session_pending = buf.get_u8();
16626        __struct.rx_session_pending = buf.get_u8();
16627        Ok(__struct)
16628    }
16629    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16630        let mut __tmp = BytesMut::new(bytes);
16631        #[allow(clippy::absurd_extreme_comparisons)]
16632        #[allow(unused_comparisons)]
16633        if __tmp.remaining() < Self::ENCODED_LEN {
16634            panic!(
16635                "buffer is too small (need {} bytes, but got {})",
16636                Self::ENCODED_LEN,
16637                __tmp.remaining(),
16638            )
16639        }
16640        __tmp.put_u64_le(self.timestamp);
16641        __tmp.put_u64_le(self.last_heartbeat);
16642        __tmp.put_u16_le(self.failed_sessions);
16643        __tmp.put_u16_le(self.successful_sessions);
16644        __tmp.put_u8(self.signal_quality);
16645        __tmp.put_u8(self.ring_pending);
16646        __tmp.put_u8(self.tx_session_pending);
16647        __tmp.put_u8(self.rx_session_pending);
16648        if matches!(version, MavlinkVersion::V2) {
16649            let len = __tmp.len();
16650            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16651        } else {
16652            __tmp.len()
16653        }
16654    }
16655}
16656#[doc = "id: 149"]
16657#[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
16658#[derive(Debug, Clone, PartialEq)]
16659#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16660#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16661pub struct LANDING_TARGET_DATA {
16662    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16663    pub time_usec: u64,
16664    #[doc = "X-axis angular offset of the target from the center of the image"]
16665    pub angle_x: f32,
16666    #[doc = "Y-axis angular offset of the target from the center of the image"]
16667    pub angle_y: f32,
16668    #[doc = "Distance to the target from the vehicle"]
16669    pub distance: f32,
16670    #[doc = "Size of target along x-axis"]
16671    pub size_x: f32,
16672    #[doc = "Size of target along y-axis"]
16673    pub size_y: f32,
16674    #[doc = "The ID of the target if multiple targets are present"]
16675    pub target_num: u8,
16676    #[doc = "Coordinate frame used for following fields."]
16677    pub frame: MavFrame,
16678    #[doc = "X Position of the landing target in MAV_FRAME"]
16679    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16680    pub x: f32,
16681    #[doc = "Y Position of the landing target in MAV_FRAME"]
16682    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16683    pub y: f32,
16684    #[doc = "Z Position of the landing target in MAV_FRAME"]
16685    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16686    pub z: f32,
16687    #[doc = "Quaternion of landing target orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
16688    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16689    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16690    pub q: [f32; 4],
16691    #[doc = "Type of landing target"]
16692    #[cfg_attr(feature = "serde", serde(default))]
16693    pub mavtype: LandingTargetType,
16694    #[doc = "Boolean indicating whether the position fields (x, y, z, q, type) contain valid target position information (valid: 1, invalid: 0). Default is 0 (invalid)."]
16695    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16696    pub position_valid: u8,
16697}
16698impl LANDING_TARGET_DATA {
16699    pub const ENCODED_LEN: usize = 60usize;
16700    pub const DEFAULT: Self = Self {
16701        time_usec: 0_u64,
16702        angle_x: 0.0_f32,
16703        angle_y: 0.0_f32,
16704        distance: 0.0_f32,
16705        size_x: 0.0_f32,
16706        size_y: 0.0_f32,
16707        target_num: 0_u8,
16708        frame: MavFrame::DEFAULT,
16709        x: 0.0_f32,
16710        y: 0.0_f32,
16711        z: 0.0_f32,
16712        q: [0.0_f32; 4usize],
16713        mavtype: LandingTargetType::DEFAULT,
16714        position_valid: 0_u8,
16715    };
16716    #[cfg(feature = "arbitrary")]
16717    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16718        use arbitrary::{Arbitrary, Unstructured};
16719        let mut buf = [0u8; 1024];
16720        rng.fill_bytes(&mut buf);
16721        let mut unstructured = Unstructured::new(&buf);
16722        Self::arbitrary(&mut unstructured).unwrap_or_default()
16723    }
16724}
16725impl Default for LANDING_TARGET_DATA {
16726    fn default() -> Self {
16727        Self::DEFAULT.clone()
16728    }
16729}
16730impl MessageData for LANDING_TARGET_DATA {
16731    type Message = MavMessage;
16732    const ID: u32 = 149u32;
16733    const NAME: &'static str = "LANDING_TARGET";
16734    const EXTRA_CRC: u8 = 200u8;
16735    const ENCODED_LEN: usize = 60usize;
16736    fn deser(
16737        _version: MavlinkVersion,
16738        __input: &[u8],
16739    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16740        let avail_len = __input.len();
16741        let mut payload_buf = [0; Self::ENCODED_LEN];
16742        let mut buf = if avail_len < Self::ENCODED_LEN {
16743            payload_buf[0..avail_len].copy_from_slice(__input);
16744            Bytes::new(&payload_buf)
16745        } else {
16746            Bytes::new(__input)
16747        };
16748        let mut __struct = Self::default();
16749        __struct.time_usec = buf.get_u64_le();
16750        __struct.angle_x = buf.get_f32_le();
16751        __struct.angle_y = buf.get_f32_le();
16752        __struct.distance = buf.get_f32_le();
16753        __struct.size_x = buf.get_f32_le();
16754        __struct.size_y = buf.get_f32_le();
16755        __struct.target_num = buf.get_u8();
16756        let tmp = buf.get_u8();
16757        __struct.frame =
16758            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16759                enum_type: "MavFrame",
16760                value: tmp as u32,
16761            })?;
16762        __struct.x = buf.get_f32_le();
16763        __struct.y = buf.get_f32_le();
16764        __struct.z = buf.get_f32_le();
16765        for v in &mut __struct.q {
16766            let val = buf.get_f32_le();
16767            *v = val;
16768        }
16769        let tmp = buf.get_u8();
16770        __struct.mavtype =
16771            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16772                enum_type: "LandingTargetType",
16773                value: tmp as u32,
16774            })?;
16775        __struct.position_valid = buf.get_u8();
16776        Ok(__struct)
16777    }
16778    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16779        let mut __tmp = BytesMut::new(bytes);
16780        #[allow(clippy::absurd_extreme_comparisons)]
16781        #[allow(unused_comparisons)]
16782        if __tmp.remaining() < Self::ENCODED_LEN {
16783            panic!(
16784                "buffer is too small (need {} bytes, but got {})",
16785                Self::ENCODED_LEN,
16786                __tmp.remaining(),
16787            )
16788        }
16789        __tmp.put_u64_le(self.time_usec);
16790        __tmp.put_f32_le(self.angle_x);
16791        __tmp.put_f32_le(self.angle_y);
16792        __tmp.put_f32_le(self.distance);
16793        __tmp.put_f32_le(self.size_x);
16794        __tmp.put_f32_le(self.size_y);
16795        __tmp.put_u8(self.target_num);
16796        __tmp.put_u8(self.frame as u8);
16797        __tmp.put_f32_le(self.x);
16798        __tmp.put_f32_le(self.y);
16799        __tmp.put_f32_le(self.z);
16800        for val in &self.q {
16801            __tmp.put_f32_le(*val);
16802        }
16803        __tmp.put_u8(self.mavtype as u8);
16804        __tmp.put_u8(self.position_valid);
16805        if matches!(version, MavlinkVersion::V2) {
16806            let len = __tmp.len();
16807            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16808        } else {
16809            __tmp.len()
16810        }
16811    }
16812}
16813#[doc = "id: 8"]
16814#[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
16815#[derive(Debug, Clone, PartialEq)]
16816#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16817#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16818pub struct LINK_NODE_STATUS_DATA {
16819    #[doc = "Timestamp (time since system boot)."]
16820    pub timestamp: u64,
16821    #[doc = "Transmit rate"]
16822    pub tx_rate: u32,
16823    #[doc = "Receive rate"]
16824    pub rx_rate: u32,
16825    #[doc = "Messages sent"]
16826    pub messages_sent: u32,
16827    #[doc = "Messages received (estimated from counting seq)"]
16828    pub messages_received: u32,
16829    #[doc = "Messages lost (estimated from counting seq)"]
16830    pub messages_lost: u32,
16831    #[doc = "Number of bytes that could not be parsed correctly."]
16832    pub rx_parse_err: u16,
16833    #[doc = "Transmit buffer overflows. This number wraps around as it reaches UINT16_MAX"]
16834    pub tx_overflows: u16,
16835    #[doc = "Receive buffer overflows. This number wraps around as it reaches UINT16_MAX"]
16836    pub rx_overflows: u16,
16837    #[doc = "Remaining free transmit buffer space"]
16838    pub tx_buf: u8,
16839    #[doc = "Remaining free receive buffer space"]
16840    pub rx_buf: u8,
16841}
16842impl LINK_NODE_STATUS_DATA {
16843    pub const ENCODED_LEN: usize = 36usize;
16844    pub const DEFAULT: Self = Self {
16845        timestamp: 0_u64,
16846        tx_rate: 0_u32,
16847        rx_rate: 0_u32,
16848        messages_sent: 0_u32,
16849        messages_received: 0_u32,
16850        messages_lost: 0_u32,
16851        rx_parse_err: 0_u16,
16852        tx_overflows: 0_u16,
16853        rx_overflows: 0_u16,
16854        tx_buf: 0_u8,
16855        rx_buf: 0_u8,
16856    };
16857    #[cfg(feature = "arbitrary")]
16858    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16859        use arbitrary::{Arbitrary, Unstructured};
16860        let mut buf = [0u8; 1024];
16861        rng.fill_bytes(&mut buf);
16862        let mut unstructured = Unstructured::new(&buf);
16863        Self::arbitrary(&mut unstructured).unwrap_or_default()
16864    }
16865}
16866impl Default for LINK_NODE_STATUS_DATA {
16867    fn default() -> Self {
16868        Self::DEFAULT.clone()
16869    }
16870}
16871impl MessageData for LINK_NODE_STATUS_DATA {
16872    type Message = MavMessage;
16873    const ID: u32 = 8u32;
16874    const NAME: &'static str = "LINK_NODE_STATUS";
16875    const EXTRA_CRC: u8 = 117u8;
16876    const ENCODED_LEN: usize = 36usize;
16877    fn deser(
16878        _version: MavlinkVersion,
16879        __input: &[u8],
16880    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16881        let avail_len = __input.len();
16882        let mut payload_buf = [0; Self::ENCODED_LEN];
16883        let mut buf = if avail_len < Self::ENCODED_LEN {
16884            payload_buf[0..avail_len].copy_from_slice(__input);
16885            Bytes::new(&payload_buf)
16886        } else {
16887            Bytes::new(__input)
16888        };
16889        let mut __struct = Self::default();
16890        __struct.timestamp = buf.get_u64_le();
16891        __struct.tx_rate = buf.get_u32_le();
16892        __struct.rx_rate = buf.get_u32_le();
16893        __struct.messages_sent = buf.get_u32_le();
16894        __struct.messages_received = buf.get_u32_le();
16895        __struct.messages_lost = buf.get_u32_le();
16896        __struct.rx_parse_err = buf.get_u16_le();
16897        __struct.tx_overflows = buf.get_u16_le();
16898        __struct.rx_overflows = buf.get_u16_le();
16899        __struct.tx_buf = buf.get_u8();
16900        __struct.rx_buf = buf.get_u8();
16901        Ok(__struct)
16902    }
16903    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16904        let mut __tmp = BytesMut::new(bytes);
16905        #[allow(clippy::absurd_extreme_comparisons)]
16906        #[allow(unused_comparisons)]
16907        if __tmp.remaining() < Self::ENCODED_LEN {
16908            panic!(
16909                "buffer is too small (need {} bytes, but got {})",
16910                Self::ENCODED_LEN,
16911                __tmp.remaining(),
16912            )
16913        }
16914        __tmp.put_u64_le(self.timestamp);
16915        __tmp.put_u32_le(self.tx_rate);
16916        __tmp.put_u32_le(self.rx_rate);
16917        __tmp.put_u32_le(self.messages_sent);
16918        __tmp.put_u32_le(self.messages_received);
16919        __tmp.put_u32_le(self.messages_lost);
16920        __tmp.put_u16_le(self.rx_parse_err);
16921        __tmp.put_u16_le(self.tx_overflows);
16922        __tmp.put_u16_le(self.rx_overflows);
16923        __tmp.put_u8(self.tx_buf);
16924        __tmp.put_u8(self.rx_buf);
16925        if matches!(version, MavlinkVersion::V2) {
16926            let len = __tmp.len();
16927            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16928        } else {
16929            __tmp.len()
16930        }
16931    }
16932}
16933#[doc = "id: 32"]
16934#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
16935#[derive(Debug, Clone, PartialEq)]
16936#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16937#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16938pub struct LOCAL_POSITION_NED_DATA {
16939    #[doc = "Timestamp (time since system boot)."]
16940    pub time_boot_ms: u32,
16941    #[doc = "X Position"]
16942    pub x: f32,
16943    #[doc = "Y Position"]
16944    pub y: f32,
16945    #[doc = "Z Position"]
16946    pub z: f32,
16947    #[doc = "X Speed"]
16948    pub vx: f32,
16949    #[doc = "Y Speed"]
16950    pub vy: f32,
16951    #[doc = "Z Speed"]
16952    pub vz: f32,
16953}
16954impl LOCAL_POSITION_NED_DATA {
16955    pub const ENCODED_LEN: usize = 28usize;
16956    pub const DEFAULT: Self = Self {
16957        time_boot_ms: 0_u32,
16958        x: 0.0_f32,
16959        y: 0.0_f32,
16960        z: 0.0_f32,
16961        vx: 0.0_f32,
16962        vy: 0.0_f32,
16963        vz: 0.0_f32,
16964    };
16965    #[cfg(feature = "arbitrary")]
16966    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16967        use arbitrary::{Arbitrary, Unstructured};
16968        let mut buf = [0u8; 1024];
16969        rng.fill_bytes(&mut buf);
16970        let mut unstructured = Unstructured::new(&buf);
16971        Self::arbitrary(&mut unstructured).unwrap_or_default()
16972    }
16973}
16974impl Default for LOCAL_POSITION_NED_DATA {
16975    fn default() -> Self {
16976        Self::DEFAULT.clone()
16977    }
16978}
16979impl MessageData for LOCAL_POSITION_NED_DATA {
16980    type Message = MavMessage;
16981    const ID: u32 = 32u32;
16982    const NAME: &'static str = "LOCAL_POSITION_NED";
16983    const EXTRA_CRC: u8 = 185u8;
16984    const ENCODED_LEN: usize = 28usize;
16985    fn deser(
16986        _version: MavlinkVersion,
16987        __input: &[u8],
16988    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16989        let avail_len = __input.len();
16990        let mut payload_buf = [0; Self::ENCODED_LEN];
16991        let mut buf = if avail_len < Self::ENCODED_LEN {
16992            payload_buf[0..avail_len].copy_from_slice(__input);
16993            Bytes::new(&payload_buf)
16994        } else {
16995            Bytes::new(__input)
16996        };
16997        let mut __struct = Self::default();
16998        __struct.time_boot_ms = buf.get_u32_le();
16999        __struct.x = buf.get_f32_le();
17000        __struct.y = buf.get_f32_le();
17001        __struct.z = buf.get_f32_le();
17002        __struct.vx = buf.get_f32_le();
17003        __struct.vy = buf.get_f32_le();
17004        __struct.vz = buf.get_f32_le();
17005        Ok(__struct)
17006    }
17007    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17008        let mut __tmp = BytesMut::new(bytes);
17009        #[allow(clippy::absurd_extreme_comparisons)]
17010        #[allow(unused_comparisons)]
17011        if __tmp.remaining() < Self::ENCODED_LEN {
17012            panic!(
17013                "buffer is too small (need {} bytes, but got {})",
17014                Self::ENCODED_LEN,
17015                __tmp.remaining(),
17016            )
17017        }
17018        __tmp.put_u32_le(self.time_boot_ms);
17019        __tmp.put_f32_le(self.x);
17020        __tmp.put_f32_le(self.y);
17021        __tmp.put_f32_le(self.z);
17022        __tmp.put_f32_le(self.vx);
17023        __tmp.put_f32_le(self.vy);
17024        __tmp.put_f32_le(self.vz);
17025        if matches!(version, MavlinkVersion::V2) {
17026            let len = __tmp.len();
17027            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17028        } else {
17029            __tmp.len()
17030        }
17031    }
17032}
17033#[doc = "id: 64"]
17034#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
17035#[derive(Debug, Clone, PartialEq)]
17036#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17037#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17038pub struct LOCAL_POSITION_NED_COV_DATA {
17039    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17040    pub time_usec: u64,
17041    #[doc = "X Position"]
17042    pub x: f32,
17043    #[doc = "Y Position"]
17044    pub y: f32,
17045    #[doc = "Z Position"]
17046    pub z: f32,
17047    #[doc = "X Speed"]
17048    pub vx: f32,
17049    #[doc = "Y Speed"]
17050    pub vy: f32,
17051    #[doc = "Z Speed"]
17052    pub vz: f32,
17053    #[doc = "X Acceleration"]
17054    pub ax: f32,
17055    #[doc = "Y Acceleration"]
17056    pub ay: f32,
17057    #[doc = "Z Acceleration"]
17058    pub az: f32,
17059    #[doc = "Row-major representation of position, velocity and acceleration 9x9 cross-covariance matrix upper right triangle (states: x, y, z, vx, vy, vz, ax, ay, az; first nine entries are the first ROW, next eight entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
17060    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17061    pub covariance: [f32; 45],
17062    #[doc = "Class id of the estimator this estimate originated from."]
17063    pub estimator_type: MavEstimatorType,
17064}
17065impl LOCAL_POSITION_NED_COV_DATA {
17066    pub const ENCODED_LEN: usize = 225usize;
17067    pub const DEFAULT: Self = Self {
17068        time_usec: 0_u64,
17069        x: 0.0_f32,
17070        y: 0.0_f32,
17071        z: 0.0_f32,
17072        vx: 0.0_f32,
17073        vy: 0.0_f32,
17074        vz: 0.0_f32,
17075        ax: 0.0_f32,
17076        ay: 0.0_f32,
17077        az: 0.0_f32,
17078        covariance: [0.0_f32; 45usize],
17079        estimator_type: MavEstimatorType::DEFAULT,
17080    };
17081    #[cfg(feature = "arbitrary")]
17082    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17083        use arbitrary::{Arbitrary, Unstructured};
17084        let mut buf = [0u8; 1024];
17085        rng.fill_bytes(&mut buf);
17086        let mut unstructured = Unstructured::new(&buf);
17087        Self::arbitrary(&mut unstructured).unwrap_or_default()
17088    }
17089}
17090impl Default for LOCAL_POSITION_NED_COV_DATA {
17091    fn default() -> Self {
17092        Self::DEFAULT.clone()
17093    }
17094}
17095impl MessageData for LOCAL_POSITION_NED_COV_DATA {
17096    type Message = MavMessage;
17097    const ID: u32 = 64u32;
17098    const NAME: &'static str = "LOCAL_POSITION_NED_COV";
17099    const EXTRA_CRC: u8 = 191u8;
17100    const ENCODED_LEN: usize = 225usize;
17101    fn deser(
17102        _version: MavlinkVersion,
17103        __input: &[u8],
17104    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17105        let avail_len = __input.len();
17106        let mut payload_buf = [0; Self::ENCODED_LEN];
17107        let mut buf = if avail_len < Self::ENCODED_LEN {
17108            payload_buf[0..avail_len].copy_from_slice(__input);
17109            Bytes::new(&payload_buf)
17110        } else {
17111            Bytes::new(__input)
17112        };
17113        let mut __struct = Self::default();
17114        __struct.time_usec = buf.get_u64_le();
17115        __struct.x = buf.get_f32_le();
17116        __struct.y = buf.get_f32_le();
17117        __struct.z = buf.get_f32_le();
17118        __struct.vx = buf.get_f32_le();
17119        __struct.vy = buf.get_f32_le();
17120        __struct.vz = buf.get_f32_le();
17121        __struct.ax = buf.get_f32_le();
17122        __struct.ay = buf.get_f32_le();
17123        __struct.az = buf.get_f32_le();
17124        for v in &mut __struct.covariance {
17125            let val = buf.get_f32_le();
17126            *v = val;
17127        }
17128        let tmp = buf.get_u8();
17129        __struct.estimator_type =
17130            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17131                enum_type: "MavEstimatorType",
17132                value: tmp as u32,
17133            })?;
17134        Ok(__struct)
17135    }
17136    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17137        let mut __tmp = BytesMut::new(bytes);
17138        #[allow(clippy::absurd_extreme_comparisons)]
17139        #[allow(unused_comparisons)]
17140        if __tmp.remaining() < Self::ENCODED_LEN {
17141            panic!(
17142                "buffer is too small (need {} bytes, but got {})",
17143                Self::ENCODED_LEN,
17144                __tmp.remaining(),
17145            )
17146        }
17147        __tmp.put_u64_le(self.time_usec);
17148        __tmp.put_f32_le(self.x);
17149        __tmp.put_f32_le(self.y);
17150        __tmp.put_f32_le(self.z);
17151        __tmp.put_f32_le(self.vx);
17152        __tmp.put_f32_le(self.vy);
17153        __tmp.put_f32_le(self.vz);
17154        __tmp.put_f32_le(self.ax);
17155        __tmp.put_f32_le(self.ay);
17156        __tmp.put_f32_le(self.az);
17157        for val in &self.covariance {
17158            __tmp.put_f32_le(*val);
17159        }
17160        __tmp.put_u8(self.estimator_type as u8);
17161        if matches!(version, MavlinkVersion::V2) {
17162            let len = __tmp.len();
17163            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17164        } else {
17165            __tmp.len()
17166        }
17167    }
17168}
17169#[doc = "id: 89"]
17170#[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
17171#[derive(Debug, Clone, PartialEq)]
17172#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17173#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17174pub struct LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17175    #[doc = "Timestamp (time since system boot)."]
17176    pub time_boot_ms: u32,
17177    #[doc = "X Position"]
17178    pub x: f32,
17179    #[doc = "Y Position"]
17180    pub y: f32,
17181    #[doc = "Z Position"]
17182    pub z: f32,
17183    #[doc = "Roll"]
17184    pub roll: f32,
17185    #[doc = "Pitch"]
17186    pub pitch: f32,
17187    #[doc = "Yaw"]
17188    pub yaw: f32,
17189}
17190impl LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17191    pub const ENCODED_LEN: usize = 28usize;
17192    pub const DEFAULT: Self = Self {
17193        time_boot_ms: 0_u32,
17194        x: 0.0_f32,
17195        y: 0.0_f32,
17196        z: 0.0_f32,
17197        roll: 0.0_f32,
17198        pitch: 0.0_f32,
17199        yaw: 0.0_f32,
17200    };
17201    #[cfg(feature = "arbitrary")]
17202    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17203        use arbitrary::{Arbitrary, Unstructured};
17204        let mut buf = [0u8; 1024];
17205        rng.fill_bytes(&mut buf);
17206        let mut unstructured = Unstructured::new(&buf);
17207        Self::arbitrary(&mut unstructured).unwrap_or_default()
17208    }
17209}
17210impl Default for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17211    fn default() -> Self {
17212        Self::DEFAULT.clone()
17213    }
17214}
17215impl MessageData for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17216    type Message = MavMessage;
17217    const ID: u32 = 89u32;
17218    const NAME: &'static str = "LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET";
17219    const EXTRA_CRC: u8 = 231u8;
17220    const ENCODED_LEN: usize = 28usize;
17221    fn deser(
17222        _version: MavlinkVersion,
17223        __input: &[u8],
17224    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17225        let avail_len = __input.len();
17226        let mut payload_buf = [0; Self::ENCODED_LEN];
17227        let mut buf = if avail_len < Self::ENCODED_LEN {
17228            payload_buf[0..avail_len].copy_from_slice(__input);
17229            Bytes::new(&payload_buf)
17230        } else {
17231            Bytes::new(__input)
17232        };
17233        let mut __struct = Self::default();
17234        __struct.time_boot_ms = buf.get_u32_le();
17235        __struct.x = buf.get_f32_le();
17236        __struct.y = buf.get_f32_le();
17237        __struct.z = buf.get_f32_le();
17238        __struct.roll = buf.get_f32_le();
17239        __struct.pitch = buf.get_f32_le();
17240        __struct.yaw = buf.get_f32_le();
17241        Ok(__struct)
17242    }
17243    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17244        let mut __tmp = BytesMut::new(bytes);
17245        #[allow(clippy::absurd_extreme_comparisons)]
17246        #[allow(unused_comparisons)]
17247        if __tmp.remaining() < Self::ENCODED_LEN {
17248            panic!(
17249                "buffer is too small (need {} bytes, but got {})",
17250                Self::ENCODED_LEN,
17251                __tmp.remaining(),
17252            )
17253        }
17254        __tmp.put_u32_le(self.time_boot_ms);
17255        __tmp.put_f32_le(self.x);
17256        __tmp.put_f32_le(self.y);
17257        __tmp.put_f32_le(self.z);
17258        __tmp.put_f32_le(self.roll);
17259        __tmp.put_f32_le(self.pitch);
17260        __tmp.put_f32_le(self.yaw);
17261        if matches!(version, MavlinkVersion::V2) {
17262            let len = __tmp.len();
17263            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17264        } else {
17265            __tmp.len()
17266        }
17267    }
17268}
17269#[doc = "id: 268"]
17270#[doc = "An ack for a LOGGING_DATA_ACKED message."]
17271#[derive(Debug, Clone, PartialEq)]
17272#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17273#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17274pub struct LOGGING_ACK_DATA {
17275    #[doc = "sequence number (must match the one in LOGGING_DATA_ACKED)"]
17276    pub sequence: u16,
17277    #[doc = "system ID of the target"]
17278    pub target_system: u8,
17279    #[doc = "component ID of the target"]
17280    pub target_component: u8,
17281}
17282impl LOGGING_ACK_DATA {
17283    pub const ENCODED_LEN: usize = 4usize;
17284    pub const DEFAULT: Self = Self {
17285        sequence: 0_u16,
17286        target_system: 0_u8,
17287        target_component: 0_u8,
17288    };
17289    #[cfg(feature = "arbitrary")]
17290    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17291        use arbitrary::{Arbitrary, Unstructured};
17292        let mut buf = [0u8; 1024];
17293        rng.fill_bytes(&mut buf);
17294        let mut unstructured = Unstructured::new(&buf);
17295        Self::arbitrary(&mut unstructured).unwrap_or_default()
17296    }
17297}
17298impl Default for LOGGING_ACK_DATA {
17299    fn default() -> Self {
17300        Self::DEFAULT.clone()
17301    }
17302}
17303impl MessageData for LOGGING_ACK_DATA {
17304    type Message = MavMessage;
17305    const ID: u32 = 268u32;
17306    const NAME: &'static str = "LOGGING_ACK";
17307    const EXTRA_CRC: u8 = 14u8;
17308    const ENCODED_LEN: usize = 4usize;
17309    fn deser(
17310        _version: MavlinkVersion,
17311        __input: &[u8],
17312    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17313        let avail_len = __input.len();
17314        let mut payload_buf = [0; Self::ENCODED_LEN];
17315        let mut buf = if avail_len < Self::ENCODED_LEN {
17316            payload_buf[0..avail_len].copy_from_slice(__input);
17317            Bytes::new(&payload_buf)
17318        } else {
17319            Bytes::new(__input)
17320        };
17321        let mut __struct = Self::default();
17322        __struct.sequence = buf.get_u16_le();
17323        __struct.target_system = buf.get_u8();
17324        __struct.target_component = buf.get_u8();
17325        Ok(__struct)
17326    }
17327    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17328        let mut __tmp = BytesMut::new(bytes);
17329        #[allow(clippy::absurd_extreme_comparisons)]
17330        #[allow(unused_comparisons)]
17331        if __tmp.remaining() < Self::ENCODED_LEN {
17332            panic!(
17333                "buffer is too small (need {} bytes, but got {})",
17334                Self::ENCODED_LEN,
17335                __tmp.remaining(),
17336            )
17337        }
17338        __tmp.put_u16_le(self.sequence);
17339        __tmp.put_u8(self.target_system);
17340        __tmp.put_u8(self.target_component);
17341        if matches!(version, MavlinkVersion::V2) {
17342            let len = __tmp.len();
17343            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17344        } else {
17345            __tmp.len()
17346        }
17347    }
17348}
17349#[doc = "id: 266"]
17350#[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
17351#[derive(Debug, Clone, PartialEq)]
17352#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17353#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17354pub struct LOGGING_DATA_DATA {
17355    #[doc = "sequence number (can wrap)"]
17356    pub sequence: u16,
17357    #[doc = "system ID of the target"]
17358    pub target_system: u8,
17359    #[doc = "component ID of the target"]
17360    pub target_component: u8,
17361    #[doc = "data length"]
17362    pub length: u8,
17363    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
17364    pub first_message_offset: u8,
17365    #[doc = "logged data"]
17366    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17367    pub data: [u8; 249],
17368}
17369impl LOGGING_DATA_DATA {
17370    pub const ENCODED_LEN: usize = 255usize;
17371    pub const DEFAULT: Self = Self {
17372        sequence: 0_u16,
17373        target_system: 0_u8,
17374        target_component: 0_u8,
17375        length: 0_u8,
17376        first_message_offset: 0_u8,
17377        data: [0_u8; 249usize],
17378    };
17379    #[cfg(feature = "arbitrary")]
17380    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17381        use arbitrary::{Arbitrary, Unstructured};
17382        let mut buf = [0u8; 1024];
17383        rng.fill_bytes(&mut buf);
17384        let mut unstructured = Unstructured::new(&buf);
17385        Self::arbitrary(&mut unstructured).unwrap_or_default()
17386    }
17387}
17388impl Default for LOGGING_DATA_DATA {
17389    fn default() -> Self {
17390        Self::DEFAULT.clone()
17391    }
17392}
17393impl MessageData for LOGGING_DATA_DATA {
17394    type Message = MavMessage;
17395    const ID: u32 = 266u32;
17396    const NAME: &'static str = "LOGGING_DATA";
17397    const EXTRA_CRC: u8 = 193u8;
17398    const ENCODED_LEN: usize = 255usize;
17399    fn deser(
17400        _version: MavlinkVersion,
17401        __input: &[u8],
17402    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17403        let avail_len = __input.len();
17404        let mut payload_buf = [0; Self::ENCODED_LEN];
17405        let mut buf = if avail_len < Self::ENCODED_LEN {
17406            payload_buf[0..avail_len].copy_from_slice(__input);
17407            Bytes::new(&payload_buf)
17408        } else {
17409            Bytes::new(__input)
17410        };
17411        let mut __struct = Self::default();
17412        __struct.sequence = buf.get_u16_le();
17413        __struct.target_system = buf.get_u8();
17414        __struct.target_component = buf.get_u8();
17415        __struct.length = buf.get_u8();
17416        __struct.first_message_offset = buf.get_u8();
17417        for v in &mut __struct.data {
17418            let val = buf.get_u8();
17419            *v = val;
17420        }
17421        Ok(__struct)
17422    }
17423    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17424        let mut __tmp = BytesMut::new(bytes);
17425        #[allow(clippy::absurd_extreme_comparisons)]
17426        #[allow(unused_comparisons)]
17427        if __tmp.remaining() < Self::ENCODED_LEN {
17428            panic!(
17429                "buffer is too small (need {} bytes, but got {})",
17430                Self::ENCODED_LEN,
17431                __tmp.remaining(),
17432            )
17433        }
17434        __tmp.put_u16_le(self.sequence);
17435        __tmp.put_u8(self.target_system);
17436        __tmp.put_u8(self.target_component);
17437        __tmp.put_u8(self.length);
17438        __tmp.put_u8(self.first_message_offset);
17439        for val in &self.data {
17440            __tmp.put_u8(*val);
17441        }
17442        if matches!(version, MavlinkVersion::V2) {
17443            let len = __tmp.len();
17444            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17445        } else {
17446            __tmp.len()
17447        }
17448    }
17449}
17450#[doc = "id: 267"]
17451#[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
17452#[derive(Debug, Clone, PartialEq)]
17453#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17454#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17455pub struct LOGGING_DATA_ACKED_DATA {
17456    #[doc = "sequence number (can wrap)"]
17457    pub sequence: u16,
17458    #[doc = "system ID of the target"]
17459    pub target_system: u8,
17460    #[doc = "component ID of the target"]
17461    pub target_component: u8,
17462    #[doc = "data length"]
17463    pub length: u8,
17464    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
17465    pub first_message_offset: u8,
17466    #[doc = "logged data"]
17467    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17468    pub data: [u8; 249],
17469}
17470impl LOGGING_DATA_ACKED_DATA {
17471    pub const ENCODED_LEN: usize = 255usize;
17472    pub const DEFAULT: Self = Self {
17473        sequence: 0_u16,
17474        target_system: 0_u8,
17475        target_component: 0_u8,
17476        length: 0_u8,
17477        first_message_offset: 0_u8,
17478        data: [0_u8; 249usize],
17479    };
17480    #[cfg(feature = "arbitrary")]
17481    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17482        use arbitrary::{Arbitrary, Unstructured};
17483        let mut buf = [0u8; 1024];
17484        rng.fill_bytes(&mut buf);
17485        let mut unstructured = Unstructured::new(&buf);
17486        Self::arbitrary(&mut unstructured).unwrap_or_default()
17487    }
17488}
17489impl Default for LOGGING_DATA_ACKED_DATA {
17490    fn default() -> Self {
17491        Self::DEFAULT.clone()
17492    }
17493}
17494impl MessageData for LOGGING_DATA_ACKED_DATA {
17495    type Message = MavMessage;
17496    const ID: u32 = 267u32;
17497    const NAME: &'static str = "LOGGING_DATA_ACKED";
17498    const EXTRA_CRC: u8 = 35u8;
17499    const ENCODED_LEN: usize = 255usize;
17500    fn deser(
17501        _version: MavlinkVersion,
17502        __input: &[u8],
17503    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17504        let avail_len = __input.len();
17505        let mut payload_buf = [0; Self::ENCODED_LEN];
17506        let mut buf = if avail_len < Self::ENCODED_LEN {
17507            payload_buf[0..avail_len].copy_from_slice(__input);
17508            Bytes::new(&payload_buf)
17509        } else {
17510            Bytes::new(__input)
17511        };
17512        let mut __struct = Self::default();
17513        __struct.sequence = buf.get_u16_le();
17514        __struct.target_system = buf.get_u8();
17515        __struct.target_component = buf.get_u8();
17516        __struct.length = buf.get_u8();
17517        __struct.first_message_offset = buf.get_u8();
17518        for v in &mut __struct.data {
17519            let val = buf.get_u8();
17520            *v = val;
17521        }
17522        Ok(__struct)
17523    }
17524    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17525        let mut __tmp = BytesMut::new(bytes);
17526        #[allow(clippy::absurd_extreme_comparisons)]
17527        #[allow(unused_comparisons)]
17528        if __tmp.remaining() < Self::ENCODED_LEN {
17529            panic!(
17530                "buffer is too small (need {} bytes, but got {})",
17531                Self::ENCODED_LEN,
17532                __tmp.remaining(),
17533            )
17534        }
17535        __tmp.put_u16_le(self.sequence);
17536        __tmp.put_u8(self.target_system);
17537        __tmp.put_u8(self.target_component);
17538        __tmp.put_u8(self.length);
17539        __tmp.put_u8(self.first_message_offset);
17540        for val in &self.data {
17541            __tmp.put_u8(*val);
17542        }
17543        if matches!(version, MavlinkVersion::V2) {
17544            let len = __tmp.len();
17545            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17546        } else {
17547            __tmp.len()
17548        }
17549    }
17550}
17551#[doc = "id: 120"]
17552#[doc = "Reply to LOG_REQUEST_DATA."]
17553#[derive(Debug, Clone, PartialEq)]
17554#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17555#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17556pub struct LOG_DATA_DATA {
17557    #[doc = "Offset into the log"]
17558    pub ofs: u32,
17559    #[doc = "Log id (from LOG_ENTRY reply)"]
17560    pub id: u16,
17561    #[doc = "Number of bytes (zero for end of log)"]
17562    pub count: u8,
17563    #[doc = "log data"]
17564    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17565    pub data: [u8; 90],
17566}
17567impl LOG_DATA_DATA {
17568    pub const ENCODED_LEN: usize = 97usize;
17569    pub const DEFAULT: Self = Self {
17570        ofs: 0_u32,
17571        id: 0_u16,
17572        count: 0_u8,
17573        data: [0_u8; 90usize],
17574    };
17575    #[cfg(feature = "arbitrary")]
17576    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17577        use arbitrary::{Arbitrary, Unstructured};
17578        let mut buf = [0u8; 1024];
17579        rng.fill_bytes(&mut buf);
17580        let mut unstructured = Unstructured::new(&buf);
17581        Self::arbitrary(&mut unstructured).unwrap_or_default()
17582    }
17583}
17584impl Default for LOG_DATA_DATA {
17585    fn default() -> Self {
17586        Self::DEFAULT.clone()
17587    }
17588}
17589impl MessageData for LOG_DATA_DATA {
17590    type Message = MavMessage;
17591    const ID: u32 = 120u32;
17592    const NAME: &'static str = "LOG_DATA";
17593    const EXTRA_CRC: u8 = 134u8;
17594    const ENCODED_LEN: usize = 97usize;
17595    fn deser(
17596        _version: MavlinkVersion,
17597        __input: &[u8],
17598    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17599        let avail_len = __input.len();
17600        let mut payload_buf = [0; Self::ENCODED_LEN];
17601        let mut buf = if avail_len < Self::ENCODED_LEN {
17602            payload_buf[0..avail_len].copy_from_slice(__input);
17603            Bytes::new(&payload_buf)
17604        } else {
17605            Bytes::new(__input)
17606        };
17607        let mut __struct = Self::default();
17608        __struct.ofs = buf.get_u32_le();
17609        __struct.id = buf.get_u16_le();
17610        __struct.count = buf.get_u8();
17611        for v in &mut __struct.data {
17612            let val = buf.get_u8();
17613            *v = val;
17614        }
17615        Ok(__struct)
17616    }
17617    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17618        let mut __tmp = BytesMut::new(bytes);
17619        #[allow(clippy::absurd_extreme_comparisons)]
17620        #[allow(unused_comparisons)]
17621        if __tmp.remaining() < Self::ENCODED_LEN {
17622            panic!(
17623                "buffer is too small (need {} bytes, but got {})",
17624                Self::ENCODED_LEN,
17625                __tmp.remaining(),
17626            )
17627        }
17628        __tmp.put_u32_le(self.ofs);
17629        __tmp.put_u16_le(self.id);
17630        __tmp.put_u8(self.count);
17631        for val in &self.data {
17632            __tmp.put_u8(*val);
17633        }
17634        if matches!(version, MavlinkVersion::V2) {
17635            let len = __tmp.len();
17636            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17637        } else {
17638            __tmp.len()
17639        }
17640    }
17641}
17642#[doc = "id: 118"]
17643#[doc = "Reply to LOG_REQUEST_LIST."]
17644#[derive(Debug, Clone, PartialEq)]
17645#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17646#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17647pub struct LOG_ENTRY_DATA {
17648    #[doc = "UTC timestamp of log since 1970, or 0 if not available"]
17649    pub time_utc: u32,
17650    #[doc = "Size of the log (may be approximate)"]
17651    pub size: u32,
17652    #[doc = "Log id"]
17653    pub id: u16,
17654    #[doc = "Total number of logs"]
17655    pub num_logs: u16,
17656    #[doc = "High log number"]
17657    pub last_log_num: u16,
17658}
17659impl LOG_ENTRY_DATA {
17660    pub const ENCODED_LEN: usize = 14usize;
17661    pub const DEFAULT: Self = Self {
17662        time_utc: 0_u32,
17663        size: 0_u32,
17664        id: 0_u16,
17665        num_logs: 0_u16,
17666        last_log_num: 0_u16,
17667    };
17668    #[cfg(feature = "arbitrary")]
17669    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17670        use arbitrary::{Arbitrary, Unstructured};
17671        let mut buf = [0u8; 1024];
17672        rng.fill_bytes(&mut buf);
17673        let mut unstructured = Unstructured::new(&buf);
17674        Self::arbitrary(&mut unstructured).unwrap_or_default()
17675    }
17676}
17677impl Default for LOG_ENTRY_DATA {
17678    fn default() -> Self {
17679        Self::DEFAULT.clone()
17680    }
17681}
17682impl MessageData for LOG_ENTRY_DATA {
17683    type Message = MavMessage;
17684    const ID: u32 = 118u32;
17685    const NAME: &'static str = "LOG_ENTRY";
17686    const EXTRA_CRC: u8 = 56u8;
17687    const ENCODED_LEN: usize = 14usize;
17688    fn deser(
17689        _version: MavlinkVersion,
17690        __input: &[u8],
17691    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17692        let avail_len = __input.len();
17693        let mut payload_buf = [0; Self::ENCODED_LEN];
17694        let mut buf = if avail_len < Self::ENCODED_LEN {
17695            payload_buf[0..avail_len].copy_from_slice(__input);
17696            Bytes::new(&payload_buf)
17697        } else {
17698            Bytes::new(__input)
17699        };
17700        let mut __struct = Self::default();
17701        __struct.time_utc = buf.get_u32_le();
17702        __struct.size = buf.get_u32_le();
17703        __struct.id = buf.get_u16_le();
17704        __struct.num_logs = buf.get_u16_le();
17705        __struct.last_log_num = buf.get_u16_le();
17706        Ok(__struct)
17707    }
17708    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17709        let mut __tmp = BytesMut::new(bytes);
17710        #[allow(clippy::absurd_extreme_comparisons)]
17711        #[allow(unused_comparisons)]
17712        if __tmp.remaining() < Self::ENCODED_LEN {
17713            panic!(
17714                "buffer is too small (need {} bytes, but got {})",
17715                Self::ENCODED_LEN,
17716                __tmp.remaining(),
17717            )
17718        }
17719        __tmp.put_u32_le(self.time_utc);
17720        __tmp.put_u32_le(self.size);
17721        __tmp.put_u16_le(self.id);
17722        __tmp.put_u16_le(self.num_logs);
17723        __tmp.put_u16_le(self.last_log_num);
17724        if matches!(version, MavlinkVersion::V2) {
17725            let len = __tmp.len();
17726            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17727        } else {
17728            __tmp.len()
17729        }
17730    }
17731}
17732#[doc = "id: 121"]
17733#[doc = "Erase all logs."]
17734#[derive(Debug, Clone, PartialEq)]
17735#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17736#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17737pub struct LOG_ERASE_DATA {
17738    #[doc = "System ID"]
17739    pub target_system: u8,
17740    #[doc = "Component ID"]
17741    pub target_component: u8,
17742}
17743impl LOG_ERASE_DATA {
17744    pub const ENCODED_LEN: usize = 2usize;
17745    pub const DEFAULT: Self = Self {
17746        target_system: 0_u8,
17747        target_component: 0_u8,
17748    };
17749    #[cfg(feature = "arbitrary")]
17750    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17751        use arbitrary::{Arbitrary, Unstructured};
17752        let mut buf = [0u8; 1024];
17753        rng.fill_bytes(&mut buf);
17754        let mut unstructured = Unstructured::new(&buf);
17755        Self::arbitrary(&mut unstructured).unwrap_or_default()
17756    }
17757}
17758impl Default for LOG_ERASE_DATA {
17759    fn default() -> Self {
17760        Self::DEFAULT.clone()
17761    }
17762}
17763impl MessageData for LOG_ERASE_DATA {
17764    type Message = MavMessage;
17765    const ID: u32 = 121u32;
17766    const NAME: &'static str = "LOG_ERASE";
17767    const EXTRA_CRC: u8 = 237u8;
17768    const ENCODED_LEN: usize = 2usize;
17769    fn deser(
17770        _version: MavlinkVersion,
17771        __input: &[u8],
17772    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17773        let avail_len = __input.len();
17774        let mut payload_buf = [0; Self::ENCODED_LEN];
17775        let mut buf = if avail_len < Self::ENCODED_LEN {
17776            payload_buf[0..avail_len].copy_from_slice(__input);
17777            Bytes::new(&payload_buf)
17778        } else {
17779            Bytes::new(__input)
17780        };
17781        let mut __struct = Self::default();
17782        __struct.target_system = buf.get_u8();
17783        __struct.target_component = buf.get_u8();
17784        Ok(__struct)
17785    }
17786    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17787        let mut __tmp = BytesMut::new(bytes);
17788        #[allow(clippy::absurd_extreme_comparisons)]
17789        #[allow(unused_comparisons)]
17790        if __tmp.remaining() < Self::ENCODED_LEN {
17791            panic!(
17792                "buffer is too small (need {} bytes, but got {})",
17793                Self::ENCODED_LEN,
17794                __tmp.remaining(),
17795            )
17796        }
17797        __tmp.put_u8(self.target_system);
17798        __tmp.put_u8(self.target_component);
17799        if matches!(version, MavlinkVersion::V2) {
17800            let len = __tmp.len();
17801            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17802        } else {
17803            __tmp.len()
17804        }
17805    }
17806}
17807#[doc = "id: 119"]
17808#[doc = "Request a chunk of a log."]
17809#[derive(Debug, Clone, PartialEq)]
17810#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17811#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17812pub struct LOG_REQUEST_DATA_DATA {
17813    #[doc = "Offset into the log"]
17814    pub ofs: u32,
17815    #[doc = "Number of bytes"]
17816    pub count: u32,
17817    #[doc = "Log id (from LOG_ENTRY reply)"]
17818    pub id: u16,
17819    #[doc = "System ID"]
17820    pub target_system: u8,
17821    #[doc = "Component ID"]
17822    pub target_component: u8,
17823}
17824impl LOG_REQUEST_DATA_DATA {
17825    pub const ENCODED_LEN: usize = 12usize;
17826    pub const DEFAULT: Self = Self {
17827        ofs: 0_u32,
17828        count: 0_u32,
17829        id: 0_u16,
17830        target_system: 0_u8,
17831        target_component: 0_u8,
17832    };
17833    #[cfg(feature = "arbitrary")]
17834    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17835        use arbitrary::{Arbitrary, Unstructured};
17836        let mut buf = [0u8; 1024];
17837        rng.fill_bytes(&mut buf);
17838        let mut unstructured = Unstructured::new(&buf);
17839        Self::arbitrary(&mut unstructured).unwrap_or_default()
17840    }
17841}
17842impl Default for LOG_REQUEST_DATA_DATA {
17843    fn default() -> Self {
17844        Self::DEFAULT.clone()
17845    }
17846}
17847impl MessageData for LOG_REQUEST_DATA_DATA {
17848    type Message = MavMessage;
17849    const ID: u32 = 119u32;
17850    const NAME: &'static str = "LOG_REQUEST_DATA";
17851    const EXTRA_CRC: u8 = 116u8;
17852    const ENCODED_LEN: usize = 12usize;
17853    fn deser(
17854        _version: MavlinkVersion,
17855        __input: &[u8],
17856    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17857        let avail_len = __input.len();
17858        let mut payload_buf = [0; Self::ENCODED_LEN];
17859        let mut buf = if avail_len < Self::ENCODED_LEN {
17860            payload_buf[0..avail_len].copy_from_slice(__input);
17861            Bytes::new(&payload_buf)
17862        } else {
17863            Bytes::new(__input)
17864        };
17865        let mut __struct = Self::default();
17866        __struct.ofs = buf.get_u32_le();
17867        __struct.count = buf.get_u32_le();
17868        __struct.id = buf.get_u16_le();
17869        __struct.target_system = buf.get_u8();
17870        __struct.target_component = buf.get_u8();
17871        Ok(__struct)
17872    }
17873    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17874        let mut __tmp = BytesMut::new(bytes);
17875        #[allow(clippy::absurd_extreme_comparisons)]
17876        #[allow(unused_comparisons)]
17877        if __tmp.remaining() < Self::ENCODED_LEN {
17878            panic!(
17879                "buffer is too small (need {} bytes, but got {})",
17880                Self::ENCODED_LEN,
17881                __tmp.remaining(),
17882            )
17883        }
17884        __tmp.put_u32_le(self.ofs);
17885        __tmp.put_u32_le(self.count);
17886        __tmp.put_u16_le(self.id);
17887        __tmp.put_u8(self.target_system);
17888        __tmp.put_u8(self.target_component);
17889        if matches!(version, MavlinkVersion::V2) {
17890            let len = __tmp.len();
17891            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17892        } else {
17893            __tmp.len()
17894        }
17895    }
17896}
17897#[doc = "id: 122"]
17898#[doc = "Stop log transfer and resume normal logging."]
17899#[derive(Debug, Clone, PartialEq)]
17900#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17901#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17902pub struct LOG_REQUEST_END_DATA {
17903    #[doc = "System ID"]
17904    pub target_system: u8,
17905    #[doc = "Component ID"]
17906    pub target_component: u8,
17907}
17908impl LOG_REQUEST_END_DATA {
17909    pub const ENCODED_LEN: usize = 2usize;
17910    pub const DEFAULT: Self = Self {
17911        target_system: 0_u8,
17912        target_component: 0_u8,
17913    };
17914    #[cfg(feature = "arbitrary")]
17915    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17916        use arbitrary::{Arbitrary, Unstructured};
17917        let mut buf = [0u8; 1024];
17918        rng.fill_bytes(&mut buf);
17919        let mut unstructured = Unstructured::new(&buf);
17920        Self::arbitrary(&mut unstructured).unwrap_or_default()
17921    }
17922}
17923impl Default for LOG_REQUEST_END_DATA {
17924    fn default() -> Self {
17925        Self::DEFAULT.clone()
17926    }
17927}
17928impl MessageData for LOG_REQUEST_END_DATA {
17929    type Message = MavMessage;
17930    const ID: u32 = 122u32;
17931    const NAME: &'static str = "LOG_REQUEST_END";
17932    const EXTRA_CRC: u8 = 203u8;
17933    const ENCODED_LEN: usize = 2usize;
17934    fn deser(
17935        _version: MavlinkVersion,
17936        __input: &[u8],
17937    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17938        let avail_len = __input.len();
17939        let mut payload_buf = [0; Self::ENCODED_LEN];
17940        let mut buf = if avail_len < Self::ENCODED_LEN {
17941            payload_buf[0..avail_len].copy_from_slice(__input);
17942            Bytes::new(&payload_buf)
17943        } else {
17944            Bytes::new(__input)
17945        };
17946        let mut __struct = Self::default();
17947        __struct.target_system = buf.get_u8();
17948        __struct.target_component = buf.get_u8();
17949        Ok(__struct)
17950    }
17951    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17952        let mut __tmp = BytesMut::new(bytes);
17953        #[allow(clippy::absurd_extreme_comparisons)]
17954        #[allow(unused_comparisons)]
17955        if __tmp.remaining() < Self::ENCODED_LEN {
17956            panic!(
17957                "buffer is too small (need {} bytes, but got {})",
17958                Self::ENCODED_LEN,
17959                __tmp.remaining(),
17960            )
17961        }
17962        __tmp.put_u8(self.target_system);
17963        __tmp.put_u8(self.target_component);
17964        if matches!(version, MavlinkVersion::V2) {
17965            let len = __tmp.len();
17966            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17967        } else {
17968            __tmp.len()
17969        }
17970    }
17971}
17972#[doc = "id: 117"]
17973#[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
17974#[derive(Debug, Clone, PartialEq)]
17975#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17976#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17977pub struct LOG_REQUEST_LIST_DATA {
17978    #[doc = "First log id (0 for first available)"]
17979    pub start: u16,
17980    #[doc = "Last log id (0xffff for last available)"]
17981    pub end: u16,
17982    #[doc = "System ID"]
17983    pub target_system: u8,
17984    #[doc = "Component ID"]
17985    pub target_component: u8,
17986}
17987impl LOG_REQUEST_LIST_DATA {
17988    pub const ENCODED_LEN: usize = 6usize;
17989    pub const DEFAULT: Self = Self {
17990        start: 0_u16,
17991        end: 0_u16,
17992        target_system: 0_u8,
17993        target_component: 0_u8,
17994    };
17995    #[cfg(feature = "arbitrary")]
17996    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17997        use arbitrary::{Arbitrary, Unstructured};
17998        let mut buf = [0u8; 1024];
17999        rng.fill_bytes(&mut buf);
18000        let mut unstructured = Unstructured::new(&buf);
18001        Self::arbitrary(&mut unstructured).unwrap_or_default()
18002    }
18003}
18004impl Default for LOG_REQUEST_LIST_DATA {
18005    fn default() -> Self {
18006        Self::DEFAULT.clone()
18007    }
18008}
18009impl MessageData for LOG_REQUEST_LIST_DATA {
18010    type Message = MavMessage;
18011    const ID: u32 = 117u32;
18012    const NAME: &'static str = "LOG_REQUEST_LIST";
18013    const EXTRA_CRC: u8 = 128u8;
18014    const ENCODED_LEN: usize = 6usize;
18015    fn deser(
18016        _version: MavlinkVersion,
18017        __input: &[u8],
18018    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18019        let avail_len = __input.len();
18020        let mut payload_buf = [0; Self::ENCODED_LEN];
18021        let mut buf = if avail_len < Self::ENCODED_LEN {
18022            payload_buf[0..avail_len].copy_from_slice(__input);
18023            Bytes::new(&payload_buf)
18024        } else {
18025            Bytes::new(__input)
18026        };
18027        let mut __struct = Self::default();
18028        __struct.start = buf.get_u16_le();
18029        __struct.end = buf.get_u16_le();
18030        __struct.target_system = buf.get_u8();
18031        __struct.target_component = buf.get_u8();
18032        Ok(__struct)
18033    }
18034    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18035        let mut __tmp = BytesMut::new(bytes);
18036        #[allow(clippy::absurd_extreme_comparisons)]
18037        #[allow(unused_comparisons)]
18038        if __tmp.remaining() < Self::ENCODED_LEN {
18039            panic!(
18040                "buffer is too small (need {} bytes, but got {})",
18041                Self::ENCODED_LEN,
18042                __tmp.remaining(),
18043            )
18044        }
18045        __tmp.put_u16_le(self.start);
18046        __tmp.put_u16_le(self.end);
18047        __tmp.put_u8(self.target_system);
18048        __tmp.put_u8(self.target_component);
18049        if matches!(version, MavlinkVersion::V2) {
18050            let len = __tmp.len();
18051            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18052        } else {
18053            __tmp.len()
18054        }
18055    }
18056}
18057#[doc = "id: 192"]
18058#[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
18059#[derive(Debug, Clone, PartialEq)]
18060#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18061#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18062pub struct MAG_CAL_REPORT_DATA {
18063    #[doc = "RMS milligauss residuals."]
18064    pub fitness: f32,
18065    #[doc = "X offset."]
18066    pub ofs_x: f32,
18067    #[doc = "Y offset."]
18068    pub ofs_y: f32,
18069    #[doc = "Z offset."]
18070    pub ofs_z: f32,
18071    #[doc = "X diagonal (matrix 11)."]
18072    pub diag_x: f32,
18073    #[doc = "Y diagonal (matrix 22)."]
18074    pub diag_y: f32,
18075    #[doc = "Z diagonal (matrix 33)."]
18076    pub diag_z: f32,
18077    #[doc = "X off-diagonal (matrix 12 and 21)."]
18078    pub offdiag_x: f32,
18079    #[doc = "Y off-diagonal (matrix 13 and 31)."]
18080    pub offdiag_y: f32,
18081    #[doc = "Z off-diagonal (matrix 32 and 23)."]
18082    pub offdiag_z: f32,
18083    #[doc = "Compass being calibrated."]
18084    pub compass_id: u8,
18085    #[doc = "Bitmask of compasses being calibrated."]
18086    pub cal_mask: u8,
18087    #[doc = "Calibration Status."]
18088    pub cal_status: MagCalStatus,
18089    #[doc = "0=requires a MAV_CMD_DO_ACCEPT_MAG_CAL, 1=saved to parameters."]
18090    pub autosaved: u8,
18091    #[doc = "Confidence in orientation (higher is better)."]
18092    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18093    pub orientation_confidence: f32,
18094    #[doc = "orientation before calibration."]
18095    #[cfg_attr(feature = "serde", serde(default))]
18096    pub old_orientation: MavSensorOrientation,
18097    #[doc = "orientation after calibration."]
18098    #[cfg_attr(feature = "serde", serde(default))]
18099    pub new_orientation: MavSensorOrientation,
18100    #[doc = "field radius correction factor"]
18101    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18102    pub scale_factor: f32,
18103}
18104impl MAG_CAL_REPORT_DATA {
18105    pub const ENCODED_LEN: usize = 54usize;
18106    pub const DEFAULT: Self = Self {
18107        fitness: 0.0_f32,
18108        ofs_x: 0.0_f32,
18109        ofs_y: 0.0_f32,
18110        ofs_z: 0.0_f32,
18111        diag_x: 0.0_f32,
18112        diag_y: 0.0_f32,
18113        diag_z: 0.0_f32,
18114        offdiag_x: 0.0_f32,
18115        offdiag_y: 0.0_f32,
18116        offdiag_z: 0.0_f32,
18117        compass_id: 0_u8,
18118        cal_mask: 0_u8,
18119        cal_status: MagCalStatus::DEFAULT,
18120        autosaved: 0_u8,
18121        orientation_confidence: 0.0_f32,
18122        old_orientation: MavSensorOrientation::DEFAULT,
18123        new_orientation: MavSensorOrientation::DEFAULT,
18124        scale_factor: 0.0_f32,
18125    };
18126    #[cfg(feature = "arbitrary")]
18127    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18128        use arbitrary::{Arbitrary, Unstructured};
18129        let mut buf = [0u8; 1024];
18130        rng.fill_bytes(&mut buf);
18131        let mut unstructured = Unstructured::new(&buf);
18132        Self::arbitrary(&mut unstructured).unwrap_or_default()
18133    }
18134}
18135impl Default for MAG_CAL_REPORT_DATA {
18136    fn default() -> Self {
18137        Self::DEFAULT.clone()
18138    }
18139}
18140impl MessageData for MAG_CAL_REPORT_DATA {
18141    type Message = MavMessage;
18142    const ID: u32 = 192u32;
18143    const NAME: &'static str = "MAG_CAL_REPORT";
18144    const EXTRA_CRC: u8 = 36u8;
18145    const ENCODED_LEN: usize = 54usize;
18146    fn deser(
18147        _version: MavlinkVersion,
18148        __input: &[u8],
18149    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18150        let avail_len = __input.len();
18151        let mut payload_buf = [0; Self::ENCODED_LEN];
18152        let mut buf = if avail_len < Self::ENCODED_LEN {
18153            payload_buf[0..avail_len].copy_from_slice(__input);
18154            Bytes::new(&payload_buf)
18155        } else {
18156            Bytes::new(__input)
18157        };
18158        let mut __struct = Self::default();
18159        __struct.fitness = buf.get_f32_le();
18160        __struct.ofs_x = buf.get_f32_le();
18161        __struct.ofs_y = buf.get_f32_le();
18162        __struct.ofs_z = buf.get_f32_le();
18163        __struct.diag_x = buf.get_f32_le();
18164        __struct.diag_y = buf.get_f32_le();
18165        __struct.diag_z = buf.get_f32_le();
18166        __struct.offdiag_x = buf.get_f32_le();
18167        __struct.offdiag_y = buf.get_f32_le();
18168        __struct.offdiag_z = buf.get_f32_le();
18169        __struct.compass_id = buf.get_u8();
18170        __struct.cal_mask = buf.get_u8();
18171        let tmp = buf.get_u8();
18172        __struct.cal_status =
18173            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18174                enum_type: "MagCalStatus",
18175                value: tmp as u32,
18176            })?;
18177        __struct.autosaved = buf.get_u8();
18178        __struct.orientation_confidence = buf.get_f32_le();
18179        let tmp = buf.get_u8();
18180        __struct.old_orientation =
18181            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18182                enum_type: "MavSensorOrientation",
18183                value: tmp as u32,
18184            })?;
18185        let tmp = buf.get_u8();
18186        __struct.new_orientation =
18187            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18188                enum_type: "MavSensorOrientation",
18189                value: tmp as u32,
18190            })?;
18191        __struct.scale_factor = buf.get_f32_le();
18192        Ok(__struct)
18193    }
18194    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18195        let mut __tmp = BytesMut::new(bytes);
18196        #[allow(clippy::absurd_extreme_comparisons)]
18197        #[allow(unused_comparisons)]
18198        if __tmp.remaining() < Self::ENCODED_LEN {
18199            panic!(
18200                "buffer is too small (need {} bytes, but got {})",
18201                Self::ENCODED_LEN,
18202                __tmp.remaining(),
18203            )
18204        }
18205        __tmp.put_f32_le(self.fitness);
18206        __tmp.put_f32_le(self.ofs_x);
18207        __tmp.put_f32_le(self.ofs_y);
18208        __tmp.put_f32_le(self.ofs_z);
18209        __tmp.put_f32_le(self.diag_x);
18210        __tmp.put_f32_le(self.diag_y);
18211        __tmp.put_f32_le(self.diag_z);
18212        __tmp.put_f32_le(self.offdiag_x);
18213        __tmp.put_f32_le(self.offdiag_y);
18214        __tmp.put_f32_le(self.offdiag_z);
18215        __tmp.put_u8(self.compass_id);
18216        __tmp.put_u8(self.cal_mask);
18217        __tmp.put_u8(self.cal_status as u8);
18218        __tmp.put_u8(self.autosaved);
18219        __tmp.put_f32_le(self.orientation_confidence);
18220        __tmp.put_u8(self.old_orientation as u8);
18221        __tmp.put_u8(self.new_orientation as u8);
18222        __tmp.put_f32_le(self.scale_factor);
18223        if matches!(version, MavlinkVersion::V2) {
18224            let len = __tmp.len();
18225            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18226        } else {
18227            __tmp.len()
18228        }
18229    }
18230}
18231#[doc = "id: 69"]
18232#[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
18233#[derive(Debug, Clone, PartialEq)]
18234#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18235#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18236pub struct MANUAL_CONTROL_DATA {
18237    #[doc = "X-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to forward(1000)-backward(-1000) movement on a joystick and the pitch of a vehicle."]
18238    pub x: i16,
18239    #[doc = "Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle."]
18240    pub y: i16,
18241    #[doc = "Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. Positive values are positive thrust, negative values are negative thrust."]
18242    pub z: i16,
18243    #[doc = "R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with counter-clockwise being 1000 and clockwise being -1000, and the yaw of a vehicle."]
18244    pub r: i16,
18245    #[doc = "A bitfield corresponding to the joystick buttons' 0-15 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1."]
18246    pub buttons: u16,
18247    #[doc = "The system to be controlled."]
18248    pub target: u8,
18249    #[doc = "A bitfield corresponding to the joystick buttons' 16-31 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 16."]
18250    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18251    pub buttons2: u16,
18252    #[doc = "Set bits to 1 to indicate which of the following extension fields contain valid data: bit 0: pitch, bit 1: roll, bit 2: aux1, bit 3: aux2, bit 4: aux3, bit 5: aux4, bit 6: aux5, bit 7: aux6"]
18253    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18254    pub enabled_extensions: u8,
18255    #[doc = "Pitch-only-axis, normalized to the range [-1000,1000]. Generally corresponds to pitch on vehicles with additional degrees of freedom. Valid if bit 0 of enabled_extensions field is set. Set to 0 if invalid."]
18256    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18257    pub s: i16,
18258    #[doc = "Roll-only-axis, normalized to the range [-1000,1000]. Generally corresponds to roll on vehicles with additional degrees of freedom. Valid if bit 1 of enabled_extensions field is set. Set to 0 if invalid."]
18259    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18260    pub t: i16,
18261    #[doc = "Aux continuous input field 1. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 2 of enabled_extensions field is set. 0 if bit 2 is unset."]
18262    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18263    pub aux1: i16,
18264    #[doc = "Aux continuous input field 2. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 3 of enabled_extensions field is set. 0 if bit 3 is unset."]
18265    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18266    pub aux2: i16,
18267    #[doc = "Aux continuous input field 3. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 4 of enabled_extensions field is set. 0 if bit 4 is unset."]
18268    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18269    pub aux3: i16,
18270    #[doc = "Aux continuous input field 4. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 5 of enabled_extensions field is set. 0 if bit 5 is unset."]
18271    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18272    pub aux4: i16,
18273    #[doc = "Aux continuous input field 5. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 6 of enabled_extensions field is set. 0 if bit 6 is unset."]
18274    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18275    pub aux5: i16,
18276    #[doc = "Aux continuous input field 6. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 7 of enabled_extensions field is set. 0 if bit 7 is unset."]
18277    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18278    pub aux6: i16,
18279}
18280impl MANUAL_CONTROL_DATA {
18281    pub const ENCODED_LEN: usize = 30usize;
18282    pub const DEFAULT: Self = Self {
18283        x: 0_i16,
18284        y: 0_i16,
18285        z: 0_i16,
18286        r: 0_i16,
18287        buttons: 0_u16,
18288        target: 0_u8,
18289        buttons2: 0_u16,
18290        enabled_extensions: 0_u8,
18291        s: 0_i16,
18292        t: 0_i16,
18293        aux1: 0_i16,
18294        aux2: 0_i16,
18295        aux3: 0_i16,
18296        aux4: 0_i16,
18297        aux5: 0_i16,
18298        aux6: 0_i16,
18299    };
18300    #[cfg(feature = "arbitrary")]
18301    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18302        use arbitrary::{Arbitrary, Unstructured};
18303        let mut buf = [0u8; 1024];
18304        rng.fill_bytes(&mut buf);
18305        let mut unstructured = Unstructured::new(&buf);
18306        Self::arbitrary(&mut unstructured).unwrap_or_default()
18307    }
18308}
18309impl Default for MANUAL_CONTROL_DATA {
18310    fn default() -> Self {
18311        Self::DEFAULT.clone()
18312    }
18313}
18314impl MessageData for MANUAL_CONTROL_DATA {
18315    type Message = MavMessage;
18316    const ID: u32 = 69u32;
18317    const NAME: &'static str = "MANUAL_CONTROL";
18318    const EXTRA_CRC: u8 = 243u8;
18319    const ENCODED_LEN: usize = 30usize;
18320    fn deser(
18321        _version: MavlinkVersion,
18322        __input: &[u8],
18323    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18324        let avail_len = __input.len();
18325        let mut payload_buf = [0; Self::ENCODED_LEN];
18326        let mut buf = if avail_len < Self::ENCODED_LEN {
18327            payload_buf[0..avail_len].copy_from_slice(__input);
18328            Bytes::new(&payload_buf)
18329        } else {
18330            Bytes::new(__input)
18331        };
18332        let mut __struct = Self::default();
18333        __struct.x = buf.get_i16_le();
18334        __struct.y = buf.get_i16_le();
18335        __struct.z = buf.get_i16_le();
18336        __struct.r = buf.get_i16_le();
18337        __struct.buttons = buf.get_u16_le();
18338        __struct.target = buf.get_u8();
18339        __struct.buttons2 = buf.get_u16_le();
18340        __struct.enabled_extensions = buf.get_u8();
18341        __struct.s = buf.get_i16_le();
18342        __struct.t = buf.get_i16_le();
18343        __struct.aux1 = buf.get_i16_le();
18344        __struct.aux2 = buf.get_i16_le();
18345        __struct.aux3 = buf.get_i16_le();
18346        __struct.aux4 = buf.get_i16_le();
18347        __struct.aux5 = buf.get_i16_le();
18348        __struct.aux6 = buf.get_i16_le();
18349        Ok(__struct)
18350    }
18351    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18352        let mut __tmp = BytesMut::new(bytes);
18353        #[allow(clippy::absurd_extreme_comparisons)]
18354        #[allow(unused_comparisons)]
18355        if __tmp.remaining() < Self::ENCODED_LEN {
18356            panic!(
18357                "buffer is too small (need {} bytes, but got {})",
18358                Self::ENCODED_LEN,
18359                __tmp.remaining(),
18360            )
18361        }
18362        __tmp.put_i16_le(self.x);
18363        __tmp.put_i16_le(self.y);
18364        __tmp.put_i16_le(self.z);
18365        __tmp.put_i16_le(self.r);
18366        __tmp.put_u16_le(self.buttons);
18367        __tmp.put_u8(self.target);
18368        __tmp.put_u16_le(self.buttons2);
18369        __tmp.put_u8(self.enabled_extensions);
18370        __tmp.put_i16_le(self.s);
18371        __tmp.put_i16_le(self.t);
18372        __tmp.put_i16_le(self.aux1);
18373        __tmp.put_i16_le(self.aux2);
18374        __tmp.put_i16_le(self.aux3);
18375        __tmp.put_i16_le(self.aux4);
18376        __tmp.put_i16_le(self.aux5);
18377        __tmp.put_i16_le(self.aux6);
18378        if matches!(version, MavlinkVersion::V2) {
18379            let len = __tmp.len();
18380            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18381        } else {
18382            __tmp.len()
18383        }
18384    }
18385}
18386#[doc = "id: 81"]
18387#[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
18388#[derive(Debug, Clone, PartialEq)]
18389#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18390#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18391pub struct MANUAL_SETPOINT_DATA {
18392    #[doc = "Timestamp (time since system boot)."]
18393    pub time_boot_ms: u32,
18394    #[doc = "Desired roll rate"]
18395    pub roll: f32,
18396    #[doc = "Desired pitch rate"]
18397    pub pitch: f32,
18398    #[doc = "Desired yaw rate"]
18399    pub yaw: f32,
18400    #[doc = "Collective thrust, normalized to 0 .. 1"]
18401    pub thrust: f32,
18402    #[doc = "Flight mode switch position, 0.. 255"]
18403    pub mode_switch: u8,
18404    #[doc = "Override mode switch position, 0.. 255"]
18405    pub manual_override_switch: u8,
18406}
18407impl MANUAL_SETPOINT_DATA {
18408    pub const ENCODED_LEN: usize = 22usize;
18409    pub const DEFAULT: Self = Self {
18410        time_boot_ms: 0_u32,
18411        roll: 0.0_f32,
18412        pitch: 0.0_f32,
18413        yaw: 0.0_f32,
18414        thrust: 0.0_f32,
18415        mode_switch: 0_u8,
18416        manual_override_switch: 0_u8,
18417    };
18418    #[cfg(feature = "arbitrary")]
18419    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18420        use arbitrary::{Arbitrary, Unstructured};
18421        let mut buf = [0u8; 1024];
18422        rng.fill_bytes(&mut buf);
18423        let mut unstructured = Unstructured::new(&buf);
18424        Self::arbitrary(&mut unstructured).unwrap_or_default()
18425    }
18426}
18427impl Default for MANUAL_SETPOINT_DATA {
18428    fn default() -> Self {
18429        Self::DEFAULT.clone()
18430    }
18431}
18432impl MessageData for MANUAL_SETPOINT_DATA {
18433    type Message = MavMessage;
18434    const ID: u32 = 81u32;
18435    const NAME: &'static str = "MANUAL_SETPOINT";
18436    const EXTRA_CRC: u8 = 106u8;
18437    const ENCODED_LEN: usize = 22usize;
18438    fn deser(
18439        _version: MavlinkVersion,
18440        __input: &[u8],
18441    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18442        let avail_len = __input.len();
18443        let mut payload_buf = [0; Self::ENCODED_LEN];
18444        let mut buf = if avail_len < Self::ENCODED_LEN {
18445            payload_buf[0..avail_len].copy_from_slice(__input);
18446            Bytes::new(&payload_buf)
18447        } else {
18448            Bytes::new(__input)
18449        };
18450        let mut __struct = Self::default();
18451        __struct.time_boot_ms = buf.get_u32_le();
18452        __struct.roll = buf.get_f32_le();
18453        __struct.pitch = buf.get_f32_le();
18454        __struct.yaw = buf.get_f32_le();
18455        __struct.thrust = buf.get_f32_le();
18456        __struct.mode_switch = buf.get_u8();
18457        __struct.manual_override_switch = buf.get_u8();
18458        Ok(__struct)
18459    }
18460    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18461        let mut __tmp = BytesMut::new(bytes);
18462        #[allow(clippy::absurd_extreme_comparisons)]
18463        #[allow(unused_comparisons)]
18464        if __tmp.remaining() < Self::ENCODED_LEN {
18465            panic!(
18466                "buffer is too small (need {} bytes, but got {})",
18467                Self::ENCODED_LEN,
18468                __tmp.remaining(),
18469            )
18470        }
18471        __tmp.put_u32_le(self.time_boot_ms);
18472        __tmp.put_f32_le(self.roll);
18473        __tmp.put_f32_le(self.pitch);
18474        __tmp.put_f32_le(self.yaw);
18475        __tmp.put_f32_le(self.thrust);
18476        __tmp.put_u8(self.mode_switch);
18477        __tmp.put_u8(self.manual_override_switch);
18478        if matches!(version, MavlinkVersion::V2) {
18479            let len = __tmp.len();
18480            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18481        } else {
18482            __tmp.len()
18483        }
18484    }
18485}
18486#[doc = "id: 249"]
18487#[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
18488#[derive(Debug, Clone, PartialEq)]
18489#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18490#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18491pub struct MEMORY_VECT_DATA {
18492    #[doc = "Starting address of the debug variables"]
18493    pub address: u16,
18494    #[doc = "Version code of the type variable. 0=unknown, type ignored and assumed int16_t. 1=as below"]
18495    pub ver: u8,
18496    #[doc = "Type code of the memory variables. for ver = 1: 0=16 x int16_t, 1=16 x uint16_t, 2=16 x Q15, 3=16 x 1Q14"]
18497    pub mavtype: u8,
18498    #[doc = "Memory contents at specified address"]
18499    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18500    pub value: [i8; 32],
18501}
18502impl MEMORY_VECT_DATA {
18503    pub const ENCODED_LEN: usize = 36usize;
18504    pub const DEFAULT: Self = Self {
18505        address: 0_u16,
18506        ver: 0_u8,
18507        mavtype: 0_u8,
18508        value: [0_i8; 32usize],
18509    };
18510    #[cfg(feature = "arbitrary")]
18511    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18512        use arbitrary::{Arbitrary, Unstructured};
18513        let mut buf = [0u8; 1024];
18514        rng.fill_bytes(&mut buf);
18515        let mut unstructured = Unstructured::new(&buf);
18516        Self::arbitrary(&mut unstructured).unwrap_or_default()
18517    }
18518}
18519impl Default for MEMORY_VECT_DATA {
18520    fn default() -> Self {
18521        Self::DEFAULT.clone()
18522    }
18523}
18524impl MessageData for MEMORY_VECT_DATA {
18525    type Message = MavMessage;
18526    const ID: u32 = 249u32;
18527    const NAME: &'static str = "MEMORY_VECT";
18528    const EXTRA_CRC: u8 = 204u8;
18529    const ENCODED_LEN: usize = 36usize;
18530    fn deser(
18531        _version: MavlinkVersion,
18532        __input: &[u8],
18533    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18534        let avail_len = __input.len();
18535        let mut payload_buf = [0; Self::ENCODED_LEN];
18536        let mut buf = if avail_len < Self::ENCODED_LEN {
18537            payload_buf[0..avail_len].copy_from_slice(__input);
18538            Bytes::new(&payload_buf)
18539        } else {
18540            Bytes::new(__input)
18541        };
18542        let mut __struct = Self::default();
18543        __struct.address = buf.get_u16_le();
18544        __struct.ver = buf.get_u8();
18545        __struct.mavtype = buf.get_u8();
18546        for v in &mut __struct.value {
18547            let val = buf.get_i8();
18548            *v = val;
18549        }
18550        Ok(__struct)
18551    }
18552    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18553        let mut __tmp = BytesMut::new(bytes);
18554        #[allow(clippy::absurd_extreme_comparisons)]
18555        #[allow(unused_comparisons)]
18556        if __tmp.remaining() < Self::ENCODED_LEN {
18557            panic!(
18558                "buffer is too small (need {} bytes, but got {})",
18559                Self::ENCODED_LEN,
18560                __tmp.remaining(),
18561            )
18562        }
18563        __tmp.put_u16_le(self.address);
18564        __tmp.put_u8(self.ver);
18565        __tmp.put_u8(self.mavtype);
18566        for val in &self.value {
18567            __tmp.put_i8(*val);
18568        }
18569        if matches!(version, MavlinkVersion::V2) {
18570            let len = __tmp.len();
18571            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18572        } else {
18573            __tmp.len()
18574        }
18575    }
18576}
18577#[doc = "id: 244"]
18578#[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
18579#[derive(Debug, Clone, PartialEq)]
18580#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18581#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18582pub struct MESSAGE_INTERVAL_DATA {
18583    #[doc = "0 indicates the interval at which it is sent."]
18584    pub interval_us: i32,
18585    #[doc = "The ID of the requested MAVLink message. v1.0 is limited to 254 messages."]
18586    pub message_id: u16,
18587}
18588impl MESSAGE_INTERVAL_DATA {
18589    pub const ENCODED_LEN: usize = 6usize;
18590    pub const DEFAULT: Self = Self {
18591        interval_us: 0_i32,
18592        message_id: 0_u16,
18593    };
18594    #[cfg(feature = "arbitrary")]
18595    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18596        use arbitrary::{Arbitrary, Unstructured};
18597        let mut buf = [0u8; 1024];
18598        rng.fill_bytes(&mut buf);
18599        let mut unstructured = Unstructured::new(&buf);
18600        Self::arbitrary(&mut unstructured).unwrap_or_default()
18601    }
18602}
18603impl Default for MESSAGE_INTERVAL_DATA {
18604    fn default() -> Self {
18605        Self::DEFAULT.clone()
18606    }
18607}
18608impl MessageData for MESSAGE_INTERVAL_DATA {
18609    type Message = MavMessage;
18610    const ID: u32 = 244u32;
18611    const NAME: &'static str = "MESSAGE_INTERVAL";
18612    const EXTRA_CRC: u8 = 95u8;
18613    const ENCODED_LEN: usize = 6usize;
18614    fn deser(
18615        _version: MavlinkVersion,
18616        __input: &[u8],
18617    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18618        let avail_len = __input.len();
18619        let mut payload_buf = [0; Self::ENCODED_LEN];
18620        let mut buf = if avail_len < Self::ENCODED_LEN {
18621            payload_buf[0..avail_len].copy_from_slice(__input);
18622            Bytes::new(&payload_buf)
18623        } else {
18624            Bytes::new(__input)
18625        };
18626        let mut __struct = Self::default();
18627        __struct.interval_us = buf.get_i32_le();
18628        __struct.message_id = buf.get_u16_le();
18629        Ok(__struct)
18630    }
18631    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18632        let mut __tmp = BytesMut::new(bytes);
18633        #[allow(clippy::absurd_extreme_comparisons)]
18634        #[allow(unused_comparisons)]
18635        if __tmp.remaining() < Self::ENCODED_LEN {
18636            panic!(
18637                "buffer is too small (need {} bytes, but got {})",
18638                Self::ENCODED_LEN,
18639                __tmp.remaining(),
18640            )
18641        }
18642        __tmp.put_i32_le(self.interval_us);
18643        __tmp.put_u16_le(self.message_id);
18644        if matches!(version, MavlinkVersion::V2) {
18645            let len = __tmp.len();
18646            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18647        } else {
18648            __tmp.len()
18649        }
18650    }
18651}
18652#[doc = "id: 47"]
18653#[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
18654#[derive(Debug, Clone, PartialEq)]
18655#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18656#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18657pub struct MISSION_ACK_DATA {
18658    #[doc = "System ID"]
18659    pub target_system: u8,
18660    #[doc = "Component ID"]
18661    pub target_component: u8,
18662    #[doc = "Mission result."]
18663    pub mavtype: MavMissionResult,
18664    #[doc = "Mission type."]
18665    #[cfg_attr(feature = "serde", serde(default))]
18666    pub mission_type: MavMissionType,
18667    #[doc = "Id of new on-vehicle mission, fence, or rally point plan (on upload to vehicle).         The id is calculated and returned by a vehicle when a new plan is uploaded by a GCS.         The only requirement on the id is that it must change when there is any change to the on-vehicle plan type (there is no requirement that the id be globally unique).         0 on download from the vehicle to the GCS (on download the ID is set in MISSION_COUNT).         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded."]
18668    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18669    pub opaque_id: u32,
18670}
18671impl MISSION_ACK_DATA {
18672    pub const ENCODED_LEN: usize = 8usize;
18673    pub const DEFAULT: Self = Self {
18674        target_system: 0_u8,
18675        target_component: 0_u8,
18676        mavtype: MavMissionResult::DEFAULT,
18677        mission_type: MavMissionType::DEFAULT,
18678        opaque_id: 0_u32,
18679    };
18680    #[cfg(feature = "arbitrary")]
18681    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18682        use arbitrary::{Arbitrary, Unstructured};
18683        let mut buf = [0u8; 1024];
18684        rng.fill_bytes(&mut buf);
18685        let mut unstructured = Unstructured::new(&buf);
18686        Self::arbitrary(&mut unstructured).unwrap_or_default()
18687    }
18688}
18689impl Default for MISSION_ACK_DATA {
18690    fn default() -> Self {
18691        Self::DEFAULT.clone()
18692    }
18693}
18694impl MessageData for MISSION_ACK_DATA {
18695    type Message = MavMessage;
18696    const ID: u32 = 47u32;
18697    const NAME: &'static str = "MISSION_ACK";
18698    const EXTRA_CRC: u8 = 153u8;
18699    const ENCODED_LEN: usize = 8usize;
18700    fn deser(
18701        _version: MavlinkVersion,
18702        __input: &[u8],
18703    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18704        let avail_len = __input.len();
18705        let mut payload_buf = [0; Self::ENCODED_LEN];
18706        let mut buf = if avail_len < Self::ENCODED_LEN {
18707            payload_buf[0..avail_len].copy_from_slice(__input);
18708            Bytes::new(&payload_buf)
18709        } else {
18710            Bytes::new(__input)
18711        };
18712        let mut __struct = Self::default();
18713        __struct.target_system = buf.get_u8();
18714        __struct.target_component = buf.get_u8();
18715        let tmp = buf.get_u8();
18716        __struct.mavtype =
18717            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18718                enum_type: "MavMissionResult",
18719                value: tmp as u32,
18720            })?;
18721        let tmp = buf.get_u8();
18722        __struct.mission_type =
18723            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18724                enum_type: "MavMissionType",
18725                value: tmp as u32,
18726            })?;
18727        __struct.opaque_id = buf.get_u32_le();
18728        Ok(__struct)
18729    }
18730    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18731        let mut __tmp = BytesMut::new(bytes);
18732        #[allow(clippy::absurd_extreme_comparisons)]
18733        #[allow(unused_comparisons)]
18734        if __tmp.remaining() < Self::ENCODED_LEN {
18735            panic!(
18736                "buffer is too small (need {} bytes, but got {})",
18737                Self::ENCODED_LEN,
18738                __tmp.remaining(),
18739            )
18740        }
18741        __tmp.put_u8(self.target_system);
18742        __tmp.put_u8(self.target_component);
18743        __tmp.put_u8(self.mavtype as u8);
18744        __tmp.put_u8(self.mission_type as u8);
18745        __tmp.put_u32_le(self.opaque_id);
18746        if matches!(version, MavlinkVersion::V2) {
18747            let len = __tmp.len();
18748            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18749        } else {
18750            __tmp.len()
18751        }
18752    }
18753}
18754#[doc = "id: 45"]
18755#[doc = "Delete all mission items at once."]
18756#[derive(Debug, Clone, PartialEq)]
18757#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18758#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18759pub struct MISSION_CLEAR_ALL_DATA {
18760    #[doc = "System ID"]
18761    pub target_system: u8,
18762    #[doc = "Component ID"]
18763    pub target_component: u8,
18764    #[doc = "Mission type."]
18765    #[cfg_attr(feature = "serde", serde(default))]
18766    pub mission_type: MavMissionType,
18767}
18768impl MISSION_CLEAR_ALL_DATA {
18769    pub const ENCODED_LEN: usize = 3usize;
18770    pub const DEFAULT: Self = Self {
18771        target_system: 0_u8,
18772        target_component: 0_u8,
18773        mission_type: MavMissionType::DEFAULT,
18774    };
18775    #[cfg(feature = "arbitrary")]
18776    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18777        use arbitrary::{Arbitrary, Unstructured};
18778        let mut buf = [0u8; 1024];
18779        rng.fill_bytes(&mut buf);
18780        let mut unstructured = Unstructured::new(&buf);
18781        Self::arbitrary(&mut unstructured).unwrap_or_default()
18782    }
18783}
18784impl Default for MISSION_CLEAR_ALL_DATA {
18785    fn default() -> Self {
18786        Self::DEFAULT.clone()
18787    }
18788}
18789impl MessageData for MISSION_CLEAR_ALL_DATA {
18790    type Message = MavMessage;
18791    const ID: u32 = 45u32;
18792    const NAME: &'static str = "MISSION_CLEAR_ALL";
18793    const EXTRA_CRC: u8 = 232u8;
18794    const ENCODED_LEN: usize = 3usize;
18795    fn deser(
18796        _version: MavlinkVersion,
18797        __input: &[u8],
18798    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18799        let avail_len = __input.len();
18800        let mut payload_buf = [0; Self::ENCODED_LEN];
18801        let mut buf = if avail_len < Self::ENCODED_LEN {
18802            payload_buf[0..avail_len].copy_from_slice(__input);
18803            Bytes::new(&payload_buf)
18804        } else {
18805            Bytes::new(__input)
18806        };
18807        let mut __struct = Self::default();
18808        __struct.target_system = buf.get_u8();
18809        __struct.target_component = buf.get_u8();
18810        let tmp = buf.get_u8();
18811        __struct.mission_type =
18812            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18813                enum_type: "MavMissionType",
18814                value: tmp as u32,
18815            })?;
18816        Ok(__struct)
18817    }
18818    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18819        let mut __tmp = BytesMut::new(bytes);
18820        #[allow(clippy::absurd_extreme_comparisons)]
18821        #[allow(unused_comparisons)]
18822        if __tmp.remaining() < Self::ENCODED_LEN {
18823            panic!(
18824                "buffer is too small (need {} bytes, but got {})",
18825                Self::ENCODED_LEN,
18826                __tmp.remaining(),
18827            )
18828        }
18829        __tmp.put_u8(self.target_system);
18830        __tmp.put_u8(self.target_component);
18831        __tmp.put_u8(self.mission_type as u8);
18832        if matches!(version, MavlinkVersion::V2) {
18833            let len = __tmp.len();
18834            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18835        } else {
18836            __tmp.len()
18837        }
18838    }
18839}
18840#[doc = "id: 44"]
18841#[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
18842#[derive(Debug, Clone, PartialEq)]
18843#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18844#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18845pub struct MISSION_COUNT_DATA {
18846    #[doc = "Number of mission items in the sequence"]
18847    pub count: u16,
18848    #[doc = "System ID"]
18849    pub target_system: u8,
18850    #[doc = "Component ID"]
18851    pub target_component: u8,
18852    #[doc = "Mission type."]
18853    #[cfg_attr(feature = "serde", serde(default))]
18854    pub mission_type: MavMissionType,
18855    #[doc = "Id of current on-vehicle mission, fence, or rally point plan (on download from vehicle).         This field is used when downloading a plan from a vehicle to a GCS.         0 on upload to the vehicle from GCS.         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded.         The ids are recalculated by the vehicle when any part of the on-vehicle plan changes (when a new plan is uploaded, the vehicle returns the new id to the GCS in MISSION_ACK)."]
18856    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18857    pub opaque_id: u32,
18858}
18859impl MISSION_COUNT_DATA {
18860    pub const ENCODED_LEN: usize = 9usize;
18861    pub const DEFAULT: Self = Self {
18862        count: 0_u16,
18863        target_system: 0_u8,
18864        target_component: 0_u8,
18865        mission_type: MavMissionType::DEFAULT,
18866        opaque_id: 0_u32,
18867    };
18868    #[cfg(feature = "arbitrary")]
18869    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18870        use arbitrary::{Arbitrary, Unstructured};
18871        let mut buf = [0u8; 1024];
18872        rng.fill_bytes(&mut buf);
18873        let mut unstructured = Unstructured::new(&buf);
18874        Self::arbitrary(&mut unstructured).unwrap_or_default()
18875    }
18876}
18877impl Default for MISSION_COUNT_DATA {
18878    fn default() -> Self {
18879        Self::DEFAULT.clone()
18880    }
18881}
18882impl MessageData for MISSION_COUNT_DATA {
18883    type Message = MavMessage;
18884    const ID: u32 = 44u32;
18885    const NAME: &'static str = "MISSION_COUNT";
18886    const EXTRA_CRC: u8 = 221u8;
18887    const ENCODED_LEN: usize = 9usize;
18888    fn deser(
18889        _version: MavlinkVersion,
18890        __input: &[u8],
18891    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18892        let avail_len = __input.len();
18893        let mut payload_buf = [0; Self::ENCODED_LEN];
18894        let mut buf = if avail_len < Self::ENCODED_LEN {
18895            payload_buf[0..avail_len].copy_from_slice(__input);
18896            Bytes::new(&payload_buf)
18897        } else {
18898            Bytes::new(__input)
18899        };
18900        let mut __struct = Self::default();
18901        __struct.count = buf.get_u16_le();
18902        __struct.target_system = buf.get_u8();
18903        __struct.target_component = buf.get_u8();
18904        let tmp = buf.get_u8();
18905        __struct.mission_type =
18906            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18907                enum_type: "MavMissionType",
18908                value: tmp as u32,
18909            })?;
18910        __struct.opaque_id = buf.get_u32_le();
18911        Ok(__struct)
18912    }
18913    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18914        let mut __tmp = BytesMut::new(bytes);
18915        #[allow(clippy::absurd_extreme_comparisons)]
18916        #[allow(unused_comparisons)]
18917        if __tmp.remaining() < Self::ENCODED_LEN {
18918            panic!(
18919                "buffer is too small (need {} bytes, but got {})",
18920                Self::ENCODED_LEN,
18921                __tmp.remaining(),
18922            )
18923        }
18924        __tmp.put_u16_le(self.count);
18925        __tmp.put_u8(self.target_system);
18926        __tmp.put_u8(self.target_component);
18927        __tmp.put_u8(self.mission_type as u8);
18928        __tmp.put_u32_le(self.opaque_id);
18929        if matches!(version, MavlinkVersion::V2) {
18930            let len = __tmp.len();
18931            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18932        } else {
18933            __tmp.len()
18934        }
18935    }
18936}
18937#[doc = "id: 42"]
18938#[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
18939#[derive(Debug, Clone, PartialEq)]
18940#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18941#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18942pub struct MISSION_CURRENT_DATA {
18943    #[doc = "Sequence"]
18944    pub seq: u16,
18945    #[doc = "Total number of mission items on vehicle (on last item, sequence == total). If the autopilot stores its home location as part of the mission this will be excluded from the total. 0: Not supported, UINT16_MAX if no mission is present on the vehicle."]
18946    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18947    pub total: u16,
18948    #[doc = "Mission state machine state. MISSION_STATE_UNKNOWN if state reporting not supported."]
18949    #[cfg_attr(feature = "serde", serde(default))]
18950    pub mission_state: MissionState,
18951    #[doc = "Vehicle is in a mode that can execute mission items or suspended. 0: Unknown, 1: In mission mode, 2: Suspended (not in mission mode)."]
18952    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18953    pub mission_mode: u8,
18954    #[doc = "Id of current on-vehicle mission plan, or 0 if IDs are not supported or there is no mission loaded. GCS can use this to track changes to the mission plan type. The same value is returned on mission upload (in the MISSION_ACK)."]
18955    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18956    pub mission_id: u32,
18957    #[doc = "Id of current on-vehicle fence plan, or 0 if IDs are not supported or there is no fence loaded. GCS can use this to track changes to the fence plan type. The same value is returned on fence upload (in the MISSION_ACK)."]
18958    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18959    pub fence_id: u32,
18960    #[doc = "Id of current on-vehicle rally point plan, or 0 if IDs are not supported or there are no rally points loaded. GCS can use this to track changes to the rally point plan type. The same value is returned on rally point upload (in the MISSION_ACK)."]
18961    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18962    pub rally_points_id: u32,
18963}
18964impl MISSION_CURRENT_DATA {
18965    pub const ENCODED_LEN: usize = 18usize;
18966    pub const DEFAULT: Self = Self {
18967        seq: 0_u16,
18968        total: 0_u16,
18969        mission_state: MissionState::DEFAULT,
18970        mission_mode: 0_u8,
18971        mission_id: 0_u32,
18972        fence_id: 0_u32,
18973        rally_points_id: 0_u32,
18974    };
18975    #[cfg(feature = "arbitrary")]
18976    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18977        use arbitrary::{Arbitrary, Unstructured};
18978        let mut buf = [0u8; 1024];
18979        rng.fill_bytes(&mut buf);
18980        let mut unstructured = Unstructured::new(&buf);
18981        Self::arbitrary(&mut unstructured).unwrap_or_default()
18982    }
18983}
18984impl Default for MISSION_CURRENT_DATA {
18985    fn default() -> Self {
18986        Self::DEFAULT.clone()
18987    }
18988}
18989impl MessageData for MISSION_CURRENT_DATA {
18990    type Message = MavMessage;
18991    const ID: u32 = 42u32;
18992    const NAME: &'static str = "MISSION_CURRENT";
18993    const EXTRA_CRC: u8 = 28u8;
18994    const ENCODED_LEN: usize = 18usize;
18995    fn deser(
18996        _version: MavlinkVersion,
18997        __input: &[u8],
18998    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18999        let avail_len = __input.len();
19000        let mut payload_buf = [0; Self::ENCODED_LEN];
19001        let mut buf = if avail_len < Self::ENCODED_LEN {
19002            payload_buf[0..avail_len].copy_from_slice(__input);
19003            Bytes::new(&payload_buf)
19004        } else {
19005            Bytes::new(__input)
19006        };
19007        let mut __struct = Self::default();
19008        __struct.seq = buf.get_u16_le();
19009        __struct.total = buf.get_u16_le();
19010        let tmp = buf.get_u8();
19011        __struct.mission_state =
19012            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19013                enum_type: "MissionState",
19014                value: tmp as u32,
19015            })?;
19016        __struct.mission_mode = buf.get_u8();
19017        __struct.mission_id = buf.get_u32_le();
19018        __struct.fence_id = buf.get_u32_le();
19019        __struct.rally_points_id = buf.get_u32_le();
19020        Ok(__struct)
19021    }
19022    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19023        let mut __tmp = BytesMut::new(bytes);
19024        #[allow(clippy::absurd_extreme_comparisons)]
19025        #[allow(unused_comparisons)]
19026        if __tmp.remaining() < Self::ENCODED_LEN {
19027            panic!(
19028                "buffer is too small (need {} bytes, but got {})",
19029                Self::ENCODED_LEN,
19030                __tmp.remaining(),
19031            )
19032        }
19033        __tmp.put_u16_le(self.seq);
19034        __tmp.put_u16_le(self.total);
19035        __tmp.put_u8(self.mission_state as u8);
19036        __tmp.put_u8(self.mission_mode);
19037        __tmp.put_u32_le(self.mission_id);
19038        __tmp.put_u32_le(self.fence_id);
19039        __tmp.put_u32_le(self.rally_points_id);
19040        if matches!(version, MavlinkVersion::V2) {
19041            let len = __tmp.len();
19042            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19043        } else {
19044            __tmp.len()
19045        }
19046    }
19047}
19048#[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
19049#[doc = "id: 39"]
19050#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
19051#[derive(Debug, Clone, PartialEq)]
19052#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19053#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19054pub struct MISSION_ITEM_DATA {
19055    #[doc = "PARAM1, see MAV_CMD enum"]
19056    pub param1: f32,
19057    #[doc = "PARAM2, see MAV_CMD enum"]
19058    pub param2: f32,
19059    #[doc = "PARAM3, see MAV_CMD enum"]
19060    pub param3: f32,
19061    #[doc = "PARAM4, see MAV_CMD enum"]
19062    pub param4: f32,
19063    #[doc = "PARAM5 / local: X coordinate, global: latitude"]
19064    pub x: f32,
19065    #[doc = "PARAM6 / local: Y coordinate, global: longitude"]
19066    pub y: f32,
19067    #[doc = "PARAM7 / local: Z coordinate, global: altitude (relative or absolute, depending on frame)."]
19068    pub z: f32,
19069    #[doc = "Sequence"]
19070    pub seq: u16,
19071    #[doc = "The scheduled action for the waypoint."]
19072    pub command: MavCmd,
19073    #[doc = "System ID"]
19074    pub target_system: u8,
19075    #[doc = "Component ID"]
19076    pub target_component: u8,
19077    #[doc = "The coordinate system of the waypoint."]
19078    pub frame: MavFrame,
19079    #[doc = "false:0, true:1"]
19080    pub current: u8,
19081    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
19082    pub autocontinue: u8,
19083    #[doc = "Mission type."]
19084    #[cfg_attr(feature = "serde", serde(default))]
19085    pub mission_type: MavMissionType,
19086}
19087impl MISSION_ITEM_DATA {
19088    pub const ENCODED_LEN: usize = 38usize;
19089    pub const DEFAULT: Self = Self {
19090        param1: 0.0_f32,
19091        param2: 0.0_f32,
19092        param3: 0.0_f32,
19093        param4: 0.0_f32,
19094        x: 0.0_f32,
19095        y: 0.0_f32,
19096        z: 0.0_f32,
19097        seq: 0_u16,
19098        command: MavCmd::DEFAULT,
19099        target_system: 0_u8,
19100        target_component: 0_u8,
19101        frame: MavFrame::DEFAULT,
19102        current: 0_u8,
19103        autocontinue: 0_u8,
19104        mission_type: MavMissionType::DEFAULT,
19105    };
19106    #[cfg(feature = "arbitrary")]
19107    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19108        use arbitrary::{Arbitrary, Unstructured};
19109        let mut buf = [0u8; 1024];
19110        rng.fill_bytes(&mut buf);
19111        let mut unstructured = Unstructured::new(&buf);
19112        Self::arbitrary(&mut unstructured).unwrap_or_default()
19113    }
19114}
19115impl Default for MISSION_ITEM_DATA {
19116    fn default() -> Self {
19117        Self::DEFAULT.clone()
19118    }
19119}
19120impl MessageData for MISSION_ITEM_DATA {
19121    type Message = MavMessage;
19122    const ID: u32 = 39u32;
19123    const NAME: &'static str = "MISSION_ITEM";
19124    const EXTRA_CRC: u8 = 254u8;
19125    const ENCODED_LEN: usize = 38usize;
19126    fn deser(
19127        _version: MavlinkVersion,
19128        __input: &[u8],
19129    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19130        let avail_len = __input.len();
19131        let mut payload_buf = [0; Self::ENCODED_LEN];
19132        let mut buf = if avail_len < Self::ENCODED_LEN {
19133            payload_buf[0..avail_len].copy_from_slice(__input);
19134            Bytes::new(&payload_buf)
19135        } else {
19136            Bytes::new(__input)
19137        };
19138        let mut __struct = Self::default();
19139        __struct.param1 = buf.get_f32_le();
19140        __struct.param2 = buf.get_f32_le();
19141        __struct.param3 = buf.get_f32_le();
19142        __struct.param4 = buf.get_f32_le();
19143        __struct.x = buf.get_f32_le();
19144        __struct.y = buf.get_f32_le();
19145        __struct.z = buf.get_f32_le();
19146        __struct.seq = buf.get_u16_le();
19147        let tmp = buf.get_u16_le();
19148        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
19149            ::mavlink_core::error::ParserError::InvalidEnum {
19150                enum_type: "MavCmd",
19151                value: tmp as u32,
19152            },
19153        )?;
19154        __struct.target_system = buf.get_u8();
19155        __struct.target_component = buf.get_u8();
19156        let tmp = buf.get_u8();
19157        __struct.frame =
19158            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19159                enum_type: "MavFrame",
19160                value: tmp as u32,
19161            })?;
19162        __struct.current = buf.get_u8();
19163        __struct.autocontinue = buf.get_u8();
19164        let tmp = buf.get_u8();
19165        __struct.mission_type =
19166            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19167                enum_type: "MavMissionType",
19168                value: tmp as u32,
19169            })?;
19170        Ok(__struct)
19171    }
19172    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19173        let mut __tmp = BytesMut::new(bytes);
19174        #[allow(clippy::absurd_extreme_comparisons)]
19175        #[allow(unused_comparisons)]
19176        if __tmp.remaining() < Self::ENCODED_LEN {
19177            panic!(
19178                "buffer is too small (need {} bytes, but got {})",
19179                Self::ENCODED_LEN,
19180                __tmp.remaining(),
19181            )
19182        }
19183        __tmp.put_f32_le(self.param1);
19184        __tmp.put_f32_le(self.param2);
19185        __tmp.put_f32_le(self.param3);
19186        __tmp.put_f32_le(self.param4);
19187        __tmp.put_f32_le(self.x);
19188        __tmp.put_f32_le(self.y);
19189        __tmp.put_f32_le(self.z);
19190        __tmp.put_u16_le(self.seq);
19191        __tmp.put_u16_le(self.command as u16);
19192        __tmp.put_u8(self.target_system);
19193        __tmp.put_u8(self.target_component);
19194        __tmp.put_u8(self.frame as u8);
19195        __tmp.put_u8(self.current);
19196        __tmp.put_u8(self.autocontinue);
19197        __tmp.put_u8(self.mission_type as u8);
19198        if matches!(version, MavlinkVersion::V2) {
19199            let len = __tmp.len();
19200            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19201        } else {
19202            __tmp.len()
19203        }
19204    }
19205}
19206#[doc = "id: 73"]
19207#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
19208#[derive(Debug, Clone, PartialEq)]
19209#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19210#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19211pub struct MISSION_ITEM_INT_DATA {
19212    #[doc = "PARAM1, see MAV_CMD enum"]
19213    pub param1: f32,
19214    #[doc = "PARAM2, see MAV_CMD enum"]
19215    pub param2: f32,
19216    #[doc = "PARAM3, see MAV_CMD enum"]
19217    pub param3: f32,
19218    #[doc = "PARAM4, see MAV_CMD enum"]
19219    pub param4: f32,
19220    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
19221    pub x: i32,
19222    #[doc = "PARAM6 / y position: local: x position in meters * 1e4, global: longitude in degrees *10^7"]
19223    pub y: i32,
19224    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame."]
19225    pub z: f32,
19226    #[doc = "Waypoint ID (sequence number). Starts at zero. Increases monotonically for each waypoint, no gaps in the sequence (0,1,2,3,4)."]
19227    pub seq: u16,
19228    #[doc = "The scheduled action for the waypoint."]
19229    pub command: MavCmd,
19230    #[doc = "System ID"]
19231    pub target_system: u8,
19232    #[doc = "Component ID"]
19233    pub target_component: u8,
19234    #[doc = "The coordinate system of the waypoint."]
19235    pub frame: MavFrame,
19236    #[doc = "false:0, true:1"]
19237    pub current: u8,
19238    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
19239    pub autocontinue: u8,
19240    #[doc = "Mission type."]
19241    #[cfg_attr(feature = "serde", serde(default))]
19242    pub mission_type: MavMissionType,
19243}
19244impl MISSION_ITEM_INT_DATA {
19245    pub const ENCODED_LEN: usize = 38usize;
19246    pub const DEFAULT: Self = Self {
19247        param1: 0.0_f32,
19248        param2: 0.0_f32,
19249        param3: 0.0_f32,
19250        param4: 0.0_f32,
19251        x: 0_i32,
19252        y: 0_i32,
19253        z: 0.0_f32,
19254        seq: 0_u16,
19255        command: MavCmd::DEFAULT,
19256        target_system: 0_u8,
19257        target_component: 0_u8,
19258        frame: MavFrame::DEFAULT,
19259        current: 0_u8,
19260        autocontinue: 0_u8,
19261        mission_type: MavMissionType::DEFAULT,
19262    };
19263    #[cfg(feature = "arbitrary")]
19264    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19265        use arbitrary::{Arbitrary, Unstructured};
19266        let mut buf = [0u8; 1024];
19267        rng.fill_bytes(&mut buf);
19268        let mut unstructured = Unstructured::new(&buf);
19269        Self::arbitrary(&mut unstructured).unwrap_or_default()
19270    }
19271}
19272impl Default for MISSION_ITEM_INT_DATA {
19273    fn default() -> Self {
19274        Self::DEFAULT.clone()
19275    }
19276}
19277impl MessageData for MISSION_ITEM_INT_DATA {
19278    type Message = MavMessage;
19279    const ID: u32 = 73u32;
19280    const NAME: &'static str = "MISSION_ITEM_INT";
19281    const EXTRA_CRC: u8 = 38u8;
19282    const ENCODED_LEN: usize = 38usize;
19283    fn deser(
19284        _version: MavlinkVersion,
19285        __input: &[u8],
19286    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19287        let avail_len = __input.len();
19288        let mut payload_buf = [0; Self::ENCODED_LEN];
19289        let mut buf = if avail_len < Self::ENCODED_LEN {
19290            payload_buf[0..avail_len].copy_from_slice(__input);
19291            Bytes::new(&payload_buf)
19292        } else {
19293            Bytes::new(__input)
19294        };
19295        let mut __struct = Self::default();
19296        __struct.param1 = buf.get_f32_le();
19297        __struct.param2 = buf.get_f32_le();
19298        __struct.param3 = buf.get_f32_le();
19299        __struct.param4 = buf.get_f32_le();
19300        __struct.x = buf.get_i32_le();
19301        __struct.y = buf.get_i32_le();
19302        __struct.z = buf.get_f32_le();
19303        __struct.seq = buf.get_u16_le();
19304        let tmp = buf.get_u16_le();
19305        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
19306            ::mavlink_core::error::ParserError::InvalidEnum {
19307                enum_type: "MavCmd",
19308                value: tmp as u32,
19309            },
19310        )?;
19311        __struct.target_system = buf.get_u8();
19312        __struct.target_component = buf.get_u8();
19313        let tmp = buf.get_u8();
19314        __struct.frame =
19315            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19316                enum_type: "MavFrame",
19317                value: tmp as u32,
19318            })?;
19319        __struct.current = buf.get_u8();
19320        __struct.autocontinue = buf.get_u8();
19321        let tmp = buf.get_u8();
19322        __struct.mission_type =
19323            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19324                enum_type: "MavMissionType",
19325                value: tmp as u32,
19326            })?;
19327        Ok(__struct)
19328    }
19329    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19330        let mut __tmp = BytesMut::new(bytes);
19331        #[allow(clippy::absurd_extreme_comparisons)]
19332        #[allow(unused_comparisons)]
19333        if __tmp.remaining() < Self::ENCODED_LEN {
19334            panic!(
19335                "buffer is too small (need {} bytes, but got {})",
19336                Self::ENCODED_LEN,
19337                __tmp.remaining(),
19338            )
19339        }
19340        __tmp.put_f32_le(self.param1);
19341        __tmp.put_f32_le(self.param2);
19342        __tmp.put_f32_le(self.param3);
19343        __tmp.put_f32_le(self.param4);
19344        __tmp.put_i32_le(self.x);
19345        __tmp.put_i32_le(self.y);
19346        __tmp.put_f32_le(self.z);
19347        __tmp.put_u16_le(self.seq);
19348        __tmp.put_u16_le(self.command as u16);
19349        __tmp.put_u8(self.target_system);
19350        __tmp.put_u8(self.target_component);
19351        __tmp.put_u8(self.frame as u8);
19352        __tmp.put_u8(self.current);
19353        __tmp.put_u8(self.autocontinue);
19354        __tmp.put_u8(self.mission_type as u8);
19355        if matches!(version, MavlinkVersion::V2) {
19356            let len = __tmp.len();
19357            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19358        } else {
19359            __tmp.len()
19360        }
19361    }
19362}
19363#[doc = "id: 46"]
19364#[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
19365#[derive(Debug, Clone, PartialEq)]
19366#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19367#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19368pub struct MISSION_ITEM_REACHED_DATA {
19369    #[doc = "Sequence"]
19370    pub seq: u16,
19371}
19372impl MISSION_ITEM_REACHED_DATA {
19373    pub const ENCODED_LEN: usize = 2usize;
19374    pub const DEFAULT: Self = Self { seq: 0_u16 };
19375    #[cfg(feature = "arbitrary")]
19376    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19377        use arbitrary::{Arbitrary, Unstructured};
19378        let mut buf = [0u8; 1024];
19379        rng.fill_bytes(&mut buf);
19380        let mut unstructured = Unstructured::new(&buf);
19381        Self::arbitrary(&mut unstructured).unwrap_or_default()
19382    }
19383}
19384impl Default for MISSION_ITEM_REACHED_DATA {
19385    fn default() -> Self {
19386        Self::DEFAULT.clone()
19387    }
19388}
19389impl MessageData for MISSION_ITEM_REACHED_DATA {
19390    type Message = MavMessage;
19391    const ID: u32 = 46u32;
19392    const NAME: &'static str = "MISSION_ITEM_REACHED";
19393    const EXTRA_CRC: u8 = 11u8;
19394    const ENCODED_LEN: usize = 2usize;
19395    fn deser(
19396        _version: MavlinkVersion,
19397        __input: &[u8],
19398    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19399        let avail_len = __input.len();
19400        let mut payload_buf = [0; Self::ENCODED_LEN];
19401        let mut buf = if avail_len < Self::ENCODED_LEN {
19402            payload_buf[0..avail_len].copy_from_slice(__input);
19403            Bytes::new(&payload_buf)
19404        } else {
19405            Bytes::new(__input)
19406        };
19407        let mut __struct = Self::default();
19408        __struct.seq = buf.get_u16_le();
19409        Ok(__struct)
19410    }
19411    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19412        let mut __tmp = BytesMut::new(bytes);
19413        #[allow(clippy::absurd_extreme_comparisons)]
19414        #[allow(unused_comparisons)]
19415        if __tmp.remaining() < Self::ENCODED_LEN {
19416            panic!(
19417                "buffer is too small (need {} bytes, but got {})",
19418                Self::ENCODED_LEN,
19419                __tmp.remaining(),
19420            )
19421        }
19422        __tmp.put_u16_le(self.seq);
19423        if matches!(version, MavlinkVersion::V2) {
19424            let len = __tmp.len();
19425            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19426        } else {
19427            __tmp.len()
19428        }
19429    }
19430}
19431#[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
19432#[doc = "id: 40"]
19433#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
19434#[derive(Debug, Clone, PartialEq)]
19435#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19436#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19437pub struct MISSION_REQUEST_DATA {
19438    #[doc = "Sequence"]
19439    pub seq: u16,
19440    #[doc = "System ID"]
19441    pub target_system: u8,
19442    #[doc = "Component ID"]
19443    pub target_component: u8,
19444    #[doc = "Mission type."]
19445    #[cfg_attr(feature = "serde", serde(default))]
19446    pub mission_type: MavMissionType,
19447}
19448impl MISSION_REQUEST_DATA {
19449    pub const ENCODED_LEN: usize = 5usize;
19450    pub const DEFAULT: Self = Self {
19451        seq: 0_u16,
19452        target_system: 0_u8,
19453        target_component: 0_u8,
19454        mission_type: MavMissionType::DEFAULT,
19455    };
19456    #[cfg(feature = "arbitrary")]
19457    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19458        use arbitrary::{Arbitrary, Unstructured};
19459        let mut buf = [0u8; 1024];
19460        rng.fill_bytes(&mut buf);
19461        let mut unstructured = Unstructured::new(&buf);
19462        Self::arbitrary(&mut unstructured).unwrap_or_default()
19463    }
19464}
19465impl Default for MISSION_REQUEST_DATA {
19466    fn default() -> Self {
19467        Self::DEFAULT.clone()
19468    }
19469}
19470impl MessageData for MISSION_REQUEST_DATA {
19471    type Message = MavMessage;
19472    const ID: u32 = 40u32;
19473    const NAME: &'static str = "MISSION_REQUEST";
19474    const EXTRA_CRC: u8 = 230u8;
19475    const ENCODED_LEN: usize = 5usize;
19476    fn deser(
19477        _version: MavlinkVersion,
19478        __input: &[u8],
19479    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19480        let avail_len = __input.len();
19481        let mut payload_buf = [0; Self::ENCODED_LEN];
19482        let mut buf = if avail_len < Self::ENCODED_LEN {
19483            payload_buf[0..avail_len].copy_from_slice(__input);
19484            Bytes::new(&payload_buf)
19485        } else {
19486            Bytes::new(__input)
19487        };
19488        let mut __struct = Self::default();
19489        __struct.seq = buf.get_u16_le();
19490        __struct.target_system = buf.get_u8();
19491        __struct.target_component = buf.get_u8();
19492        let tmp = buf.get_u8();
19493        __struct.mission_type =
19494            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19495                enum_type: "MavMissionType",
19496                value: tmp as u32,
19497            })?;
19498        Ok(__struct)
19499    }
19500    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19501        let mut __tmp = BytesMut::new(bytes);
19502        #[allow(clippy::absurd_extreme_comparisons)]
19503        #[allow(unused_comparisons)]
19504        if __tmp.remaining() < Self::ENCODED_LEN {
19505            panic!(
19506                "buffer is too small (need {} bytes, but got {})",
19507                Self::ENCODED_LEN,
19508                __tmp.remaining(),
19509            )
19510        }
19511        __tmp.put_u16_le(self.seq);
19512        __tmp.put_u8(self.target_system);
19513        __tmp.put_u8(self.target_component);
19514        __tmp.put_u8(self.mission_type as u8);
19515        if matches!(version, MavlinkVersion::V2) {
19516            let len = __tmp.len();
19517            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19518        } else {
19519            __tmp.len()
19520        }
19521    }
19522}
19523#[doc = "id: 51"]
19524#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
19525#[derive(Debug, Clone, PartialEq)]
19526#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19527#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19528pub struct MISSION_REQUEST_INT_DATA {
19529    #[doc = "Sequence"]
19530    pub seq: u16,
19531    #[doc = "System ID"]
19532    pub target_system: u8,
19533    #[doc = "Component ID"]
19534    pub target_component: u8,
19535    #[doc = "Mission type."]
19536    #[cfg_attr(feature = "serde", serde(default))]
19537    pub mission_type: MavMissionType,
19538}
19539impl MISSION_REQUEST_INT_DATA {
19540    pub const ENCODED_LEN: usize = 5usize;
19541    pub const DEFAULT: Self = Self {
19542        seq: 0_u16,
19543        target_system: 0_u8,
19544        target_component: 0_u8,
19545        mission_type: MavMissionType::DEFAULT,
19546    };
19547    #[cfg(feature = "arbitrary")]
19548    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19549        use arbitrary::{Arbitrary, Unstructured};
19550        let mut buf = [0u8; 1024];
19551        rng.fill_bytes(&mut buf);
19552        let mut unstructured = Unstructured::new(&buf);
19553        Self::arbitrary(&mut unstructured).unwrap_or_default()
19554    }
19555}
19556impl Default for MISSION_REQUEST_INT_DATA {
19557    fn default() -> Self {
19558        Self::DEFAULT.clone()
19559    }
19560}
19561impl MessageData for MISSION_REQUEST_INT_DATA {
19562    type Message = MavMessage;
19563    const ID: u32 = 51u32;
19564    const NAME: &'static str = "MISSION_REQUEST_INT";
19565    const EXTRA_CRC: u8 = 196u8;
19566    const ENCODED_LEN: usize = 5usize;
19567    fn deser(
19568        _version: MavlinkVersion,
19569        __input: &[u8],
19570    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19571        let avail_len = __input.len();
19572        let mut payload_buf = [0; Self::ENCODED_LEN];
19573        let mut buf = if avail_len < Self::ENCODED_LEN {
19574            payload_buf[0..avail_len].copy_from_slice(__input);
19575            Bytes::new(&payload_buf)
19576        } else {
19577            Bytes::new(__input)
19578        };
19579        let mut __struct = Self::default();
19580        __struct.seq = buf.get_u16_le();
19581        __struct.target_system = buf.get_u8();
19582        __struct.target_component = buf.get_u8();
19583        let tmp = buf.get_u8();
19584        __struct.mission_type =
19585            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19586                enum_type: "MavMissionType",
19587                value: tmp as u32,
19588            })?;
19589        Ok(__struct)
19590    }
19591    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19592        let mut __tmp = BytesMut::new(bytes);
19593        #[allow(clippy::absurd_extreme_comparisons)]
19594        #[allow(unused_comparisons)]
19595        if __tmp.remaining() < Self::ENCODED_LEN {
19596            panic!(
19597                "buffer is too small (need {} bytes, but got {})",
19598                Self::ENCODED_LEN,
19599                __tmp.remaining(),
19600            )
19601        }
19602        __tmp.put_u16_le(self.seq);
19603        __tmp.put_u8(self.target_system);
19604        __tmp.put_u8(self.target_component);
19605        __tmp.put_u8(self.mission_type as u8);
19606        if matches!(version, MavlinkVersion::V2) {
19607            let len = __tmp.len();
19608            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19609        } else {
19610            __tmp.len()
19611        }
19612    }
19613}
19614#[doc = "id: 43"]
19615#[doc = "Request the overall list of mission items from the system/component."]
19616#[derive(Debug, Clone, PartialEq)]
19617#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19618#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19619pub struct MISSION_REQUEST_LIST_DATA {
19620    #[doc = "System ID"]
19621    pub target_system: u8,
19622    #[doc = "Component ID"]
19623    pub target_component: u8,
19624    #[doc = "Mission type."]
19625    #[cfg_attr(feature = "serde", serde(default))]
19626    pub mission_type: MavMissionType,
19627}
19628impl MISSION_REQUEST_LIST_DATA {
19629    pub const ENCODED_LEN: usize = 3usize;
19630    pub const DEFAULT: Self = Self {
19631        target_system: 0_u8,
19632        target_component: 0_u8,
19633        mission_type: MavMissionType::DEFAULT,
19634    };
19635    #[cfg(feature = "arbitrary")]
19636    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19637        use arbitrary::{Arbitrary, Unstructured};
19638        let mut buf = [0u8; 1024];
19639        rng.fill_bytes(&mut buf);
19640        let mut unstructured = Unstructured::new(&buf);
19641        Self::arbitrary(&mut unstructured).unwrap_or_default()
19642    }
19643}
19644impl Default for MISSION_REQUEST_LIST_DATA {
19645    fn default() -> Self {
19646        Self::DEFAULT.clone()
19647    }
19648}
19649impl MessageData for MISSION_REQUEST_LIST_DATA {
19650    type Message = MavMessage;
19651    const ID: u32 = 43u32;
19652    const NAME: &'static str = "MISSION_REQUEST_LIST";
19653    const EXTRA_CRC: u8 = 132u8;
19654    const ENCODED_LEN: usize = 3usize;
19655    fn deser(
19656        _version: MavlinkVersion,
19657        __input: &[u8],
19658    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19659        let avail_len = __input.len();
19660        let mut payload_buf = [0; Self::ENCODED_LEN];
19661        let mut buf = if avail_len < Self::ENCODED_LEN {
19662            payload_buf[0..avail_len].copy_from_slice(__input);
19663            Bytes::new(&payload_buf)
19664        } else {
19665            Bytes::new(__input)
19666        };
19667        let mut __struct = Self::default();
19668        __struct.target_system = buf.get_u8();
19669        __struct.target_component = buf.get_u8();
19670        let tmp = buf.get_u8();
19671        __struct.mission_type =
19672            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19673                enum_type: "MavMissionType",
19674                value: tmp as u32,
19675            })?;
19676        Ok(__struct)
19677    }
19678    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19679        let mut __tmp = BytesMut::new(bytes);
19680        #[allow(clippy::absurd_extreme_comparisons)]
19681        #[allow(unused_comparisons)]
19682        if __tmp.remaining() < Self::ENCODED_LEN {
19683            panic!(
19684                "buffer is too small (need {} bytes, but got {})",
19685                Self::ENCODED_LEN,
19686                __tmp.remaining(),
19687            )
19688        }
19689        __tmp.put_u8(self.target_system);
19690        __tmp.put_u8(self.target_component);
19691        __tmp.put_u8(self.mission_type as u8);
19692        if matches!(version, MavlinkVersion::V2) {
19693            let len = __tmp.len();
19694            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19695        } else {
19696            __tmp.len()
19697        }
19698    }
19699}
19700#[doc = "id: 37"]
19701#[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
19702#[derive(Debug, Clone, PartialEq)]
19703#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19704#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19705pub struct MISSION_REQUEST_PARTIAL_LIST_DATA {
19706    #[doc = "Start index"]
19707    pub start_index: i16,
19708    #[doc = "End index, -1 by default (-1: send list to end). Else a valid index of the list"]
19709    pub end_index: i16,
19710    #[doc = "System ID"]
19711    pub target_system: u8,
19712    #[doc = "Component ID"]
19713    pub target_component: u8,
19714    #[doc = "Mission type."]
19715    #[cfg_attr(feature = "serde", serde(default))]
19716    pub mission_type: MavMissionType,
19717}
19718impl MISSION_REQUEST_PARTIAL_LIST_DATA {
19719    pub const ENCODED_LEN: usize = 7usize;
19720    pub const DEFAULT: Self = Self {
19721        start_index: 0_i16,
19722        end_index: 0_i16,
19723        target_system: 0_u8,
19724        target_component: 0_u8,
19725        mission_type: MavMissionType::DEFAULT,
19726    };
19727    #[cfg(feature = "arbitrary")]
19728    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19729        use arbitrary::{Arbitrary, Unstructured};
19730        let mut buf = [0u8; 1024];
19731        rng.fill_bytes(&mut buf);
19732        let mut unstructured = Unstructured::new(&buf);
19733        Self::arbitrary(&mut unstructured).unwrap_or_default()
19734    }
19735}
19736impl Default for MISSION_REQUEST_PARTIAL_LIST_DATA {
19737    fn default() -> Self {
19738        Self::DEFAULT.clone()
19739    }
19740}
19741impl MessageData for MISSION_REQUEST_PARTIAL_LIST_DATA {
19742    type Message = MavMessage;
19743    const ID: u32 = 37u32;
19744    const NAME: &'static str = "MISSION_REQUEST_PARTIAL_LIST";
19745    const EXTRA_CRC: u8 = 212u8;
19746    const ENCODED_LEN: usize = 7usize;
19747    fn deser(
19748        _version: MavlinkVersion,
19749        __input: &[u8],
19750    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19751        let avail_len = __input.len();
19752        let mut payload_buf = [0; Self::ENCODED_LEN];
19753        let mut buf = if avail_len < Self::ENCODED_LEN {
19754            payload_buf[0..avail_len].copy_from_slice(__input);
19755            Bytes::new(&payload_buf)
19756        } else {
19757            Bytes::new(__input)
19758        };
19759        let mut __struct = Self::default();
19760        __struct.start_index = buf.get_i16_le();
19761        __struct.end_index = buf.get_i16_le();
19762        __struct.target_system = buf.get_u8();
19763        __struct.target_component = buf.get_u8();
19764        let tmp = buf.get_u8();
19765        __struct.mission_type =
19766            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19767                enum_type: "MavMissionType",
19768                value: tmp as u32,
19769            })?;
19770        Ok(__struct)
19771    }
19772    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19773        let mut __tmp = BytesMut::new(bytes);
19774        #[allow(clippy::absurd_extreme_comparisons)]
19775        #[allow(unused_comparisons)]
19776        if __tmp.remaining() < Self::ENCODED_LEN {
19777            panic!(
19778                "buffer is too small (need {} bytes, but got {})",
19779                Self::ENCODED_LEN,
19780                __tmp.remaining(),
19781            )
19782        }
19783        __tmp.put_i16_le(self.start_index);
19784        __tmp.put_i16_le(self.end_index);
19785        __tmp.put_u8(self.target_system);
19786        __tmp.put_u8(self.target_component);
19787        __tmp.put_u8(self.mission_type as u8);
19788        if matches!(version, MavlinkVersion::V2) {
19789            let len = __tmp.len();
19790            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19791        } else {
19792            __tmp.len()
19793        }
19794    }
19795}
19796#[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
19797#[doc = "id: 41"]
19798#[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
19799#[derive(Debug, Clone, PartialEq)]
19800#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19801#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19802pub struct MISSION_SET_CURRENT_DATA {
19803    #[doc = "Sequence"]
19804    pub seq: u16,
19805    #[doc = "System ID"]
19806    pub target_system: u8,
19807    #[doc = "Component ID"]
19808    pub target_component: u8,
19809}
19810impl MISSION_SET_CURRENT_DATA {
19811    pub const ENCODED_LEN: usize = 4usize;
19812    pub const DEFAULT: Self = Self {
19813        seq: 0_u16,
19814        target_system: 0_u8,
19815        target_component: 0_u8,
19816    };
19817    #[cfg(feature = "arbitrary")]
19818    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19819        use arbitrary::{Arbitrary, Unstructured};
19820        let mut buf = [0u8; 1024];
19821        rng.fill_bytes(&mut buf);
19822        let mut unstructured = Unstructured::new(&buf);
19823        Self::arbitrary(&mut unstructured).unwrap_or_default()
19824    }
19825}
19826impl Default for MISSION_SET_CURRENT_DATA {
19827    fn default() -> Self {
19828        Self::DEFAULT.clone()
19829    }
19830}
19831impl MessageData for MISSION_SET_CURRENT_DATA {
19832    type Message = MavMessage;
19833    const ID: u32 = 41u32;
19834    const NAME: &'static str = "MISSION_SET_CURRENT";
19835    const EXTRA_CRC: u8 = 28u8;
19836    const ENCODED_LEN: usize = 4usize;
19837    fn deser(
19838        _version: MavlinkVersion,
19839        __input: &[u8],
19840    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19841        let avail_len = __input.len();
19842        let mut payload_buf = [0; Self::ENCODED_LEN];
19843        let mut buf = if avail_len < Self::ENCODED_LEN {
19844            payload_buf[0..avail_len].copy_from_slice(__input);
19845            Bytes::new(&payload_buf)
19846        } else {
19847            Bytes::new(__input)
19848        };
19849        let mut __struct = Self::default();
19850        __struct.seq = buf.get_u16_le();
19851        __struct.target_system = buf.get_u8();
19852        __struct.target_component = buf.get_u8();
19853        Ok(__struct)
19854    }
19855    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19856        let mut __tmp = BytesMut::new(bytes);
19857        #[allow(clippy::absurd_extreme_comparisons)]
19858        #[allow(unused_comparisons)]
19859        if __tmp.remaining() < Self::ENCODED_LEN {
19860            panic!(
19861                "buffer is too small (need {} bytes, but got {})",
19862                Self::ENCODED_LEN,
19863                __tmp.remaining(),
19864            )
19865        }
19866        __tmp.put_u16_le(self.seq);
19867        __tmp.put_u8(self.target_system);
19868        __tmp.put_u8(self.target_component);
19869        if matches!(version, MavlinkVersion::V2) {
19870            let len = __tmp.len();
19871            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19872        } else {
19873            __tmp.len()
19874        }
19875    }
19876}
19877#[doc = "id: 38"]
19878#[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
19879#[derive(Debug, Clone, PartialEq)]
19880#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19881#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19882pub struct MISSION_WRITE_PARTIAL_LIST_DATA {
19883    #[doc = "Start index. Must be smaller / equal to the largest index of the current onboard list."]
19884    pub start_index: i16,
19885    #[doc = "End index, equal or greater than start index."]
19886    pub end_index: i16,
19887    #[doc = "System ID"]
19888    pub target_system: u8,
19889    #[doc = "Component ID"]
19890    pub target_component: u8,
19891    #[doc = "Mission type."]
19892    #[cfg_attr(feature = "serde", serde(default))]
19893    pub mission_type: MavMissionType,
19894}
19895impl MISSION_WRITE_PARTIAL_LIST_DATA {
19896    pub const ENCODED_LEN: usize = 7usize;
19897    pub const DEFAULT: Self = Self {
19898        start_index: 0_i16,
19899        end_index: 0_i16,
19900        target_system: 0_u8,
19901        target_component: 0_u8,
19902        mission_type: MavMissionType::DEFAULT,
19903    };
19904    #[cfg(feature = "arbitrary")]
19905    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19906        use arbitrary::{Arbitrary, Unstructured};
19907        let mut buf = [0u8; 1024];
19908        rng.fill_bytes(&mut buf);
19909        let mut unstructured = Unstructured::new(&buf);
19910        Self::arbitrary(&mut unstructured).unwrap_or_default()
19911    }
19912}
19913impl Default for MISSION_WRITE_PARTIAL_LIST_DATA {
19914    fn default() -> Self {
19915        Self::DEFAULT.clone()
19916    }
19917}
19918impl MessageData for MISSION_WRITE_PARTIAL_LIST_DATA {
19919    type Message = MavMessage;
19920    const ID: u32 = 38u32;
19921    const NAME: &'static str = "MISSION_WRITE_PARTIAL_LIST";
19922    const EXTRA_CRC: u8 = 9u8;
19923    const ENCODED_LEN: usize = 7usize;
19924    fn deser(
19925        _version: MavlinkVersion,
19926        __input: &[u8],
19927    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19928        let avail_len = __input.len();
19929        let mut payload_buf = [0; Self::ENCODED_LEN];
19930        let mut buf = if avail_len < Self::ENCODED_LEN {
19931            payload_buf[0..avail_len].copy_from_slice(__input);
19932            Bytes::new(&payload_buf)
19933        } else {
19934            Bytes::new(__input)
19935        };
19936        let mut __struct = Self::default();
19937        __struct.start_index = buf.get_i16_le();
19938        __struct.end_index = buf.get_i16_le();
19939        __struct.target_system = buf.get_u8();
19940        __struct.target_component = buf.get_u8();
19941        let tmp = buf.get_u8();
19942        __struct.mission_type =
19943            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19944                enum_type: "MavMissionType",
19945                value: tmp as u32,
19946            })?;
19947        Ok(__struct)
19948    }
19949    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19950        let mut __tmp = BytesMut::new(bytes);
19951        #[allow(clippy::absurd_extreme_comparisons)]
19952        #[allow(unused_comparisons)]
19953        if __tmp.remaining() < Self::ENCODED_LEN {
19954            panic!(
19955                "buffer is too small (need {} bytes, but got {})",
19956                Self::ENCODED_LEN,
19957                __tmp.remaining(),
19958            )
19959        }
19960        __tmp.put_i16_le(self.start_index);
19961        __tmp.put_i16_le(self.end_index);
19962        __tmp.put_u8(self.target_system);
19963        __tmp.put_u8(self.target_component);
19964        __tmp.put_u8(self.mission_type as u8);
19965        if matches!(version, MavlinkVersion::V2) {
19966            let len = __tmp.len();
19967            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19968        } else {
19969            __tmp.len()
19970        }
19971    }
19972}
19973#[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
19974#[doc = "id: 265"]
19975#[doc = "Orientation of a mount."]
19976#[derive(Debug, Clone, PartialEq)]
19977#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19978#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19979pub struct MOUNT_ORIENTATION_DATA {
19980    #[doc = "Timestamp (time since system boot)."]
19981    pub time_boot_ms: u32,
19982    #[doc = "Roll in global frame (set to NaN for invalid)."]
19983    pub roll: f32,
19984    #[doc = "Pitch in global frame (set to NaN for invalid)."]
19985    pub pitch: f32,
19986    #[doc = "Yaw relative to vehicle (set to NaN for invalid)."]
19987    pub yaw: f32,
19988    #[doc = "Yaw in absolute frame relative to Earth's North, north is 0 (set to NaN for invalid)."]
19989    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19990    pub yaw_absolute: f32,
19991}
19992impl MOUNT_ORIENTATION_DATA {
19993    pub const ENCODED_LEN: usize = 20usize;
19994    pub const DEFAULT: Self = Self {
19995        time_boot_ms: 0_u32,
19996        roll: 0.0_f32,
19997        pitch: 0.0_f32,
19998        yaw: 0.0_f32,
19999        yaw_absolute: 0.0_f32,
20000    };
20001    #[cfg(feature = "arbitrary")]
20002    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20003        use arbitrary::{Arbitrary, Unstructured};
20004        let mut buf = [0u8; 1024];
20005        rng.fill_bytes(&mut buf);
20006        let mut unstructured = Unstructured::new(&buf);
20007        Self::arbitrary(&mut unstructured).unwrap_or_default()
20008    }
20009}
20010impl Default for MOUNT_ORIENTATION_DATA {
20011    fn default() -> Self {
20012        Self::DEFAULT.clone()
20013    }
20014}
20015impl MessageData for MOUNT_ORIENTATION_DATA {
20016    type Message = MavMessage;
20017    const ID: u32 = 265u32;
20018    const NAME: &'static str = "MOUNT_ORIENTATION";
20019    const EXTRA_CRC: u8 = 26u8;
20020    const ENCODED_LEN: usize = 20usize;
20021    fn deser(
20022        _version: MavlinkVersion,
20023        __input: &[u8],
20024    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20025        let avail_len = __input.len();
20026        let mut payload_buf = [0; Self::ENCODED_LEN];
20027        let mut buf = if avail_len < Self::ENCODED_LEN {
20028            payload_buf[0..avail_len].copy_from_slice(__input);
20029            Bytes::new(&payload_buf)
20030        } else {
20031            Bytes::new(__input)
20032        };
20033        let mut __struct = Self::default();
20034        __struct.time_boot_ms = buf.get_u32_le();
20035        __struct.roll = buf.get_f32_le();
20036        __struct.pitch = buf.get_f32_le();
20037        __struct.yaw = buf.get_f32_le();
20038        __struct.yaw_absolute = buf.get_f32_le();
20039        Ok(__struct)
20040    }
20041    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20042        let mut __tmp = BytesMut::new(bytes);
20043        #[allow(clippy::absurd_extreme_comparisons)]
20044        #[allow(unused_comparisons)]
20045        if __tmp.remaining() < Self::ENCODED_LEN {
20046            panic!(
20047                "buffer is too small (need {} bytes, but got {})",
20048                Self::ENCODED_LEN,
20049                __tmp.remaining(),
20050            )
20051        }
20052        __tmp.put_u32_le(self.time_boot_ms);
20053        __tmp.put_f32_le(self.roll);
20054        __tmp.put_f32_le(self.pitch);
20055        __tmp.put_f32_le(self.yaw);
20056        __tmp.put_f32_le(self.yaw_absolute);
20057        if matches!(version, MavlinkVersion::V2) {
20058            let len = __tmp.len();
20059            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20060        } else {
20061            __tmp.len()
20062        }
20063    }
20064}
20065#[doc = "id: 251"]
20066#[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
20067#[derive(Debug, Clone, PartialEq)]
20068#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20069#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20070pub struct NAMED_VALUE_FLOAT_DATA {
20071    #[doc = "Timestamp (time since system boot)."]
20072    pub time_boot_ms: u32,
20073    #[doc = "Floating point value"]
20074    pub value: f32,
20075    #[doc = "Name of the debug variable"]
20076    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20077    pub name: [u8; 10],
20078}
20079impl NAMED_VALUE_FLOAT_DATA {
20080    pub const ENCODED_LEN: usize = 18usize;
20081    pub const DEFAULT: Self = Self {
20082        time_boot_ms: 0_u32,
20083        value: 0.0_f32,
20084        name: [0_u8; 10usize],
20085    };
20086    #[cfg(feature = "arbitrary")]
20087    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20088        use arbitrary::{Arbitrary, Unstructured};
20089        let mut buf = [0u8; 1024];
20090        rng.fill_bytes(&mut buf);
20091        let mut unstructured = Unstructured::new(&buf);
20092        Self::arbitrary(&mut unstructured).unwrap_or_default()
20093    }
20094}
20095impl Default for NAMED_VALUE_FLOAT_DATA {
20096    fn default() -> Self {
20097        Self::DEFAULT.clone()
20098    }
20099}
20100impl MessageData for NAMED_VALUE_FLOAT_DATA {
20101    type Message = MavMessage;
20102    const ID: u32 = 251u32;
20103    const NAME: &'static str = "NAMED_VALUE_FLOAT";
20104    const EXTRA_CRC: u8 = 170u8;
20105    const ENCODED_LEN: usize = 18usize;
20106    fn deser(
20107        _version: MavlinkVersion,
20108        __input: &[u8],
20109    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20110        let avail_len = __input.len();
20111        let mut payload_buf = [0; Self::ENCODED_LEN];
20112        let mut buf = if avail_len < Self::ENCODED_LEN {
20113            payload_buf[0..avail_len].copy_from_slice(__input);
20114            Bytes::new(&payload_buf)
20115        } else {
20116            Bytes::new(__input)
20117        };
20118        let mut __struct = Self::default();
20119        __struct.time_boot_ms = buf.get_u32_le();
20120        __struct.value = buf.get_f32_le();
20121        for v in &mut __struct.name {
20122            let val = buf.get_u8();
20123            *v = val;
20124        }
20125        Ok(__struct)
20126    }
20127    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20128        let mut __tmp = BytesMut::new(bytes);
20129        #[allow(clippy::absurd_extreme_comparisons)]
20130        #[allow(unused_comparisons)]
20131        if __tmp.remaining() < Self::ENCODED_LEN {
20132            panic!(
20133                "buffer is too small (need {} bytes, but got {})",
20134                Self::ENCODED_LEN,
20135                __tmp.remaining(),
20136            )
20137        }
20138        __tmp.put_u32_le(self.time_boot_ms);
20139        __tmp.put_f32_le(self.value);
20140        for val in &self.name {
20141            __tmp.put_u8(*val);
20142        }
20143        if matches!(version, MavlinkVersion::V2) {
20144            let len = __tmp.len();
20145            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20146        } else {
20147            __tmp.len()
20148        }
20149    }
20150}
20151#[doc = "id: 252"]
20152#[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
20153#[derive(Debug, Clone, PartialEq)]
20154#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20155#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20156pub struct NAMED_VALUE_INT_DATA {
20157    #[doc = "Timestamp (time since system boot)."]
20158    pub time_boot_ms: u32,
20159    #[doc = "Signed integer value"]
20160    pub value: i32,
20161    #[doc = "Name of the debug variable"]
20162    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20163    pub name: [u8; 10],
20164}
20165impl NAMED_VALUE_INT_DATA {
20166    pub const ENCODED_LEN: usize = 18usize;
20167    pub const DEFAULT: Self = Self {
20168        time_boot_ms: 0_u32,
20169        value: 0_i32,
20170        name: [0_u8; 10usize],
20171    };
20172    #[cfg(feature = "arbitrary")]
20173    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20174        use arbitrary::{Arbitrary, Unstructured};
20175        let mut buf = [0u8; 1024];
20176        rng.fill_bytes(&mut buf);
20177        let mut unstructured = Unstructured::new(&buf);
20178        Self::arbitrary(&mut unstructured).unwrap_or_default()
20179    }
20180}
20181impl Default for NAMED_VALUE_INT_DATA {
20182    fn default() -> Self {
20183        Self::DEFAULT.clone()
20184    }
20185}
20186impl MessageData for NAMED_VALUE_INT_DATA {
20187    type Message = MavMessage;
20188    const ID: u32 = 252u32;
20189    const NAME: &'static str = "NAMED_VALUE_INT";
20190    const EXTRA_CRC: u8 = 44u8;
20191    const ENCODED_LEN: usize = 18usize;
20192    fn deser(
20193        _version: MavlinkVersion,
20194        __input: &[u8],
20195    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20196        let avail_len = __input.len();
20197        let mut payload_buf = [0; Self::ENCODED_LEN];
20198        let mut buf = if avail_len < Self::ENCODED_LEN {
20199            payload_buf[0..avail_len].copy_from_slice(__input);
20200            Bytes::new(&payload_buf)
20201        } else {
20202            Bytes::new(__input)
20203        };
20204        let mut __struct = Self::default();
20205        __struct.time_boot_ms = buf.get_u32_le();
20206        __struct.value = buf.get_i32_le();
20207        for v in &mut __struct.name {
20208            let val = buf.get_u8();
20209            *v = val;
20210        }
20211        Ok(__struct)
20212    }
20213    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20214        let mut __tmp = BytesMut::new(bytes);
20215        #[allow(clippy::absurd_extreme_comparisons)]
20216        #[allow(unused_comparisons)]
20217        if __tmp.remaining() < Self::ENCODED_LEN {
20218            panic!(
20219                "buffer is too small (need {} bytes, but got {})",
20220                Self::ENCODED_LEN,
20221                __tmp.remaining(),
20222            )
20223        }
20224        __tmp.put_u32_le(self.time_boot_ms);
20225        __tmp.put_i32_le(self.value);
20226        for val in &self.name {
20227            __tmp.put_u8(*val);
20228        }
20229        if matches!(version, MavlinkVersion::V2) {
20230            let len = __tmp.len();
20231            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20232        } else {
20233            __tmp.len()
20234        }
20235    }
20236}
20237#[doc = "id: 62"]
20238#[doc = "The state of the navigation and position controller."]
20239#[derive(Debug, Clone, PartialEq)]
20240#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20241#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20242pub struct NAV_CONTROLLER_OUTPUT_DATA {
20243    #[doc = "Current desired roll"]
20244    pub nav_roll: f32,
20245    #[doc = "Current desired pitch"]
20246    pub nav_pitch: f32,
20247    #[doc = "Current altitude error"]
20248    pub alt_error: f32,
20249    #[doc = "Current airspeed error"]
20250    pub aspd_error: f32,
20251    #[doc = "Current crosstrack error on x-y plane"]
20252    pub xtrack_error: f32,
20253    #[doc = "Current desired heading"]
20254    pub nav_bearing: i16,
20255    #[doc = "Bearing to current waypoint/target"]
20256    pub target_bearing: i16,
20257    #[doc = "Distance to active waypoint"]
20258    pub wp_dist: u16,
20259}
20260impl NAV_CONTROLLER_OUTPUT_DATA {
20261    pub const ENCODED_LEN: usize = 26usize;
20262    pub const DEFAULT: Self = Self {
20263        nav_roll: 0.0_f32,
20264        nav_pitch: 0.0_f32,
20265        alt_error: 0.0_f32,
20266        aspd_error: 0.0_f32,
20267        xtrack_error: 0.0_f32,
20268        nav_bearing: 0_i16,
20269        target_bearing: 0_i16,
20270        wp_dist: 0_u16,
20271    };
20272    #[cfg(feature = "arbitrary")]
20273    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20274        use arbitrary::{Arbitrary, Unstructured};
20275        let mut buf = [0u8; 1024];
20276        rng.fill_bytes(&mut buf);
20277        let mut unstructured = Unstructured::new(&buf);
20278        Self::arbitrary(&mut unstructured).unwrap_or_default()
20279    }
20280}
20281impl Default for NAV_CONTROLLER_OUTPUT_DATA {
20282    fn default() -> Self {
20283        Self::DEFAULT.clone()
20284    }
20285}
20286impl MessageData for NAV_CONTROLLER_OUTPUT_DATA {
20287    type Message = MavMessage;
20288    const ID: u32 = 62u32;
20289    const NAME: &'static str = "NAV_CONTROLLER_OUTPUT";
20290    const EXTRA_CRC: u8 = 183u8;
20291    const ENCODED_LEN: usize = 26usize;
20292    fn deser(
20293        _version: MavlinkVersion,
20294        __input: &[u8],
20295    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20296        let avail_len = __input.len();
20297        let mut payload_buf = [0; Self::ENCODED_LEN];
20298        let mut buf = if avail_len < Self::ENCODED_LEN {
20299            payload_buf[0..avail_len].copy_from_slice(__input);
20300            Bytes::new(&payload_buf)
20301        } else {
20302            Bytes::new(__input)
20303        };
20304        let mut __struct = Self::default();
20305        __struct.nav_roll = buf.get_f32_le();
20306        __struct.nav_pitch = buf.get_f32_le();
20307        __struct.alt_error = buf.get_f32_le();
20308        __struct.aspd_error = buf.get_f32_le();
20309        __struct.xtrack_error = buf.get_f32_le();
20310        __struct.nav_bearing = buf.get_i16_le();
20311        __struct.target_bearing = buf.get_i16_le();
20312        __struct.wp_dist = buf.get_u16_le();
20313        Ok(__struct)
20314    }
20315    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20316        let mut __tmp = BytesMut::new(bytes);
20317        #[allow(clippy::absurd_extreme_comparisons)]
20318        #[allow(unused_comparisons)]
20319        if __tmp.remaining() < Self::ENCODED_LEN {
20320            panic!(
20321                "buffer is too small (need {} bytes, but got {})",
20322                Self::ENCODED_LEN,
20323                __tmp.remaining(),
20324            )
20325        }
20326        __tmp.put_f32_le(self.nav_roll);
20327        __tmp.put_f32_le(self.nav_pitch);
20328        __tmp.put_f32_le(self.alt_error);
20329        __tmp.put_f32_le(self.aspd_error);
20330        __tmp.put_f32_le(self.xtrack_error);
20331        __tmp.put_i16_le(self.nav_bearing);
20332        __tmp.put_i16_le(self.target_bearing);
20333        __tmp.put_u16_le(self.wp_dist);
20334        if matches!(version, MavlinkVersion::V2) {
20335            let len = __tmp.len();
20336            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20337        } else {
20338            __tmp.len()
20339        }
20340    }
20341}
20342#[doc = "id: 330"]
20343#[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
20344#[derive(Debug, Clone, PartialEq)]
20345#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20346#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20347pub struct OBSTACLE_DISTANCE_DATA {
20348    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
20349    pub time_usec: u64,
20350    #[doc = "Distance of obstacles around the vehicle with index 0 corresponding to north + angle_offset, unless otherwise specified in the frame. A value of 0 is valid and means that the obstacle is practically touching the sensor. A value of max_distance +1 means no obstacle is present. A value of UINT16_MAX for unknown/not used. In a array element, one unit corresponds to 1cm."]
20351    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20352    pub distances: [u16; 72],
20353    #[doc = "Minimum distance the sensor can measure."]
20354    pub min_distance: u16,
20355    #[doc = "Maximum distance the sensor can measure."]
20356    pub max_distance: u16,
20357    #[doc = "Class id of the distance sensor type."]
20358    pub sensor_type: MavDistanceSensor,
20359    #[doc = "Angular width in degrees of each array element. Increment direction is clockwise. This field is ignored if increment_f is non-zero."]
20360    pub increment: u8,
20361    #[doc = "Angular width in degrees of each array element as a float. If non-zero then this value is used instead of the uint8_t increment field. Positive is clockwise direction, negative is counter-clockwise."]
20362    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20363    pub increment_f: f32,
20364    #[doc = "Relative angle offset of the 0-index element in the distances array. Value of 0 corresponds to forward. Positive is clockwise direction, negative is counter-clockwise."]
20365    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20366    pub angle_offset: f32,
20367    #[doc = "Coordinate frame of reference for the yaw rotation and offset of the sensor data. Defaults to MAV_FRAME_GLOBAL, which is north aligned. For body-mounted sensors use MAV_FRAME_BODY_FRD, which is vehicle front aligned."]
20368    #[cfg_attr(feature = "serde", serde(default))]
20369    pub frame: MavFrame,
20370}
20371impl OBSTACLE_DISTANCE_DATA {
20372    pub const ENCODED_LEN: usize = 167usize;
20373    pub const DEFAULT: Self = Self {
20374        time_usec: 0_u64,
20375        distances: [0_u16; 72usize],
20376        min_distance: 0_u16,
20377        max_distance: 0_u16,
20378        sensor_type: MavDistanceSensor::DEFAULT,
20379        increment: 0_u8,
20380        increment_f: 0.0_f32,
20381        angle_offset: 0.0_f32,
20382        frame: MavFrame::DEFAULT,
20383    };
20384    #[cfg(feature = "arbitrary")]
20385    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20386        use arbitrary::{Arbitrary, Unstructured};
20387        let mut buf = [0u8; 1024];
20388        rng.fill_bytes(&mut buf);
20389        let mut unstructured = Unstructured::new(&buf);
20390        Self::arbitrary(&mut unstructured).unwrap_or_default()
20391    }
20392}
20393impl Default for OBSTACLE_DISTANCE_DATA {
20394    fn default() -> Self {
20395        Self::DEFAULT.clone()
20396    }
20397}
20398impl MessageData for OBSTACLE_DISTANCE_DATA {
20399    type Message = MavMessage;
20400    const ID: u32 = 330u32;
20401    const NAME: &'static str = "OBSTACLE_DISTANCE";
20402    const EXTRA_CRC: u8 = 23u8;
20403    const ENCODED_LEN: usize = 167usize;
20404    fn deser(
20405        _version: MavlinkVersion,
20406        __input: &[u8],
20407    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20408        let avail_len = __input.len();
20409        let mut payload_buf = [0; Self::ENCODED_LEN];
20410        let mut buf = if avail_len < Self::ENCODED_LEN {
20411            payload_buf[0..avail_len].copy_from_slice(__input);
20412            Bytes::new(&payload_buf)
20413        } else {
20414            Bytes::new(__input)
20415        };
20416        let mut __struct = Self::default();
20417        __struct.time_usec = buf.get_u64_le();
20418        for v in &mut __struct.distances {
20419            let val = buf.get_u16_le();
20420            *v = val;
20421        }
20422        __struct.min_distance = buf.get_u16_le();
20423        __struct.max_distance = buf.get_u16_le();
20424        let tmp = buf.get_u8();
20425        __struct.sensor_type =
20426            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20427                enum_type: "MavDistanceSensor",
20428                value: tmp as u32,
20429            })?;
20430        __struct.increment = buf.get_u8();
20431        __struct.increment_f = buf.get_f32_le();
20432        __struct.angle_offset = buf.get_f32_le();
20433        let tmp = buf.get_u8();
20434        __struct.frame =
20435            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20436                enum_type: "MavFrame",
20437                value: tmp as u32,
20438            })?;
20439        Ok(__struct)
20440    }
20441    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20442        let mut __tmp = BytesMut::new(bytes);
20443        #[allow(clippy::absurd_extreme_comparisons)]
20444        #[allow(unused_comparisons)]
20445        if __tmp.remaining() < Self::ENCODED_LEN {
20446            panic!(
20447                "buffer is too small (need {} bytes, but got {})",
20448                Self::ENCODED_LEN,
20449                __tmp.remaining(),
20450            )
20451        }
20452        __tmp.put_u64_le(self.time_usec);
20453        for val in &self.distances {
20454            __tmp.put_u16_le(*val);
20455        }
20456        __tmp.put_u16_le(self.min_distance);
20457        __tmp.put_u16_le(self.max_distance);
20458        __tmp.put_u8(self.sensor_type as u8);
20459        __tmp.put_u8(self.increment);
20460        __tmp.put_f32_le(self.increment_f);
20461        __tmp.put_f32_le(self.angle_offset);
20462        __tmp.put_u8(self.frame as u8);
20463        if matches!(version, MavlinkVersion::V2) {
20464            let len = __tmp.len();
20465            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20466        } else {
20467            __tmp.len()
20468        }
20469    }
20470}
20471#[doc = "id: 331"]
20472#[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
20473#[derive(Debug, Clone, PartialEq)]
20474#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20475#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20476pub struct ODOMETRY_DATA {
20477    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
20478    pub time_usec: u64,
20479    #[doc = "X Position"]
20480    pub x: f32,
20481    #[doc = "Y Position"]
20482    pub y: f32,
20483    #[doc = "Z Position"]
20484    pub z: f32,
20485    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
20486    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20487    pub q: [f32; 4],
20488    #[doc = "X linear speed"]
20489    pub vx: f32,
20490    #[doc = "Y linear speed"]
20491    pub vy: f32,
20492    #[doc = "Z linear speed"]
20493    pub vz: f32,
20494    #[doc = "Roll angular speed"]
20495    pub rollspeed: f32,
20496    #[doc = "Pitch angular speed"]
20497    pub pitchspeed: f32,
20498    #[doc = "Yaw angular speed"]
20499    pub yawspeed: f32,
20500    #[doc = "Row-major representation of a 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
20501    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20502    pub pose_covariance: [f32; 21],
20503    #[doc = "Row-major representation of a 6x6 velocity cross-covariance matrix upper right triangle (states: vx, vy, vz, rollspeed, pitchspeed, yawspeed; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
20504    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20505    pub velocity_covariance: [f32; 21],
20506    #[doc = "Coordinate frame of reference for the pose data."]
20507    pub frame_id: MavFrame,
20508    #[doc = "Coordinate frame of reference for the velocity in free space (twist) data."]
20509    pub child_frame_id: MavFrame,
20510    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
20511    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20512    pub reset_counter: u8,
20513    #[doc = "Type of estimator that is providing the odometry."]
20514    #[cfg_attr(feature = "serde", serde(default))]
20515    pub estimator_type: MavEstimatorType,
20516    #[doc = "Optional odometry quality metric as a percentage. -1 = odometry has failed, 0 = unknown/unset quality, 1 = worst quality, 100 = best quality"]
20517    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20518    pub quality: i8,
20519}
20520impl ODOMETRY_DATA {
20521    pub const ENCODED_LEN: usize = 233usize;
20522    pub const DEFAULT: Self = Self {
20523        time_usec: 0_u64,
20524        x: 0.0_f32,
20525        y: 0.0_f32,
20526        z: 0.0_f32,
20527        q: [0.0_f32; 4usize],
20528        vx: 0.0_f32,
20529        vy: 0.0_f32,
20530        vz: 0.0_f32,
20531        rollspeed: 0.0_f32,
20532        pitchspeed: 0.0_f32,
20533        yawspeed: 0.0_f32,
20534        pose_covariance: [0.0_f32; 21usize],
20535        velocity_covariance: [0.0_f32; 21usize],
20536        frame_id: MavFrame::DEFAULT,
20537        child_frame_id: MavFrame::DEFAULT,
20538        reset_counter: 0_u8,
20539        estimator_type: MavEstimatorType::DEFAULT,
20540        quality: 0_i8,
20541    };
20542    #[cfg(feature = "arbitrary")]
20543    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20544        use arbitrary::{Arbitrary, Unstructured};
20545        let mut buf = [0u8; 1024];
20546        rng.fill_bytes(&mut buf);
20547        let mut unstructured = Unstructured::new(&buf);
20548        Self::arbitrary(&mut unstructured).unwrap_or_default()
20549    }
20550}
20551impl Default for ODOMETRY_DATA {
20552    fn default() -> Self {
20553        Self::DEFAULT.clone()
20554    }
20555}
20556impl MessageData for ODOMETRY_DATA {
20557    type Message = MavMessage;
20558    const ID: u32 = 331u32;
20559    const NAME: &'static str = "ODOMETRY";
20560    const EXTRA_CRC: u8 = 91u8;
20561    const ENCODED_LEN: usize = 233usize;
20562    fn deser(
20563        _version: MavlinkVersion,
20564        __input: &[u8],
20565    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20566        let avail_len = __input.len();
20567        let mut payload_buf = [0; Self::ENCODED_LEN];
20568        let mut buf = if avail_len < Self::ENCODED_LEN {
20569            payload_buf[0..avail_len].copy_from_slice(__input);
20570            Bytes::new(&payload_buf)
20571        } else {
20572            Bytes::new(__input)
20573        };
20574        let mut __struct = Self::default();
20575        __struct.time_usec = buf.get_u64_le();
20576        __struct.x = buf.get_f32_le();
20577        __struct.y = buf.get_f32_le();
20578        __struct.z = buf.get_f32_le();
20579        for v in &mut __struct.q {
20580            let val = buf.get_f32_le();
20581            *v = val;
20582        }
20583        __struct.vx = buf.get_f32_le();
20584        __struct.vy = buf.get_f32_le();
20585        __struct.vz = buf.get_f32_le();
20586        __struct.rollspeed = buf.get_f32_le();
20587        __struct.pitchspeed = buf.get_f32_le();
20588        __struct.yawspeed = buf.get_f32_le();
20589        for v in &mut __struct.pose_covariance {
20590            let val = buf.get_f32_le();
20591            *v = val;
20592        }
20593        for v in &mut __struct.velocity_covariance {
20594            let val = buf.get_f32_le();
20595            *v = val;
20596        }
20597        let tmp = buf.get_u8();
20598        __struct.frame_id =
20599            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20600                enum_type: "MavFrame",
20601                value: tmp as u32,
20602            })?;
20603        let tmp = buf.get_u8();
20604        __struct.child_frame_id =
20605            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20606                enum_type: "MavFrame",
20607                value: tmp as u32,
20608            })?;
20609        __struct.reset_counter = buf.get_u8();
20610        let tmp = buf.get_u8();
20611        __struct.estimator_type =
20612            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20613                enum_type: "MavEstimatorType",
20614                value: tmp as u32,
20615            })?;
20616        __struct.quality = buf.get_i8();
20617        Ok(__struct)
20618    }
20619    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20620        let mut __tmp = BytesMut::new(bytes);
20621        #[allow(clippy::absurd_extreme_comparisons)]
20622        #[allow(unused_comparisons)]
20623        if __tmp.remaining() < Self::ENCODED_LEN {
20624            panic!(
20625                "buffer is too small (need {} bytes, but got {})",
20626                Self::ENCODED_LEN,
20627                __tmp.remaining(),
20628            )
20629        }
20630        __tmp.put_u64_le(self.time_usec);
20631        __tmp.put_f32_le(self.x);
20632        __tmp.put_f32_le(self.y);
20633        __tmp.put_f32_le(self.z);
20634        for val in &self.q {
20635            __tmp.put_f32_le(*val);
20636        }
20637        __tmp.put_f32_le(self.vx);
20638        __tmp.put_f32_le(self.vy);
20639        __tmp.put_f32_le(self.vz);
20640        __tmp.put_f32_le(self.rollspeed);
20641        __tmp.put_f32_le(self.pitchspeed);
20642        __tmp.put_f32_le(self.yawspeed);
20643        for val in &self.pose_covariance {
20644            __tmp.put_f32_le(*val);
20645        }
20646        for val in &self.velocity_covariance {
20647            __tmp.put_f32_le(*val);
20648        }
20649        __tmp.put_u8(self.frame_id as u8);
20650        __tmp.put_u8(self.child_frame_id as u8);
20651        __tmp.put_u8(self.reset_counter);
20652        __tmp.put_u8(self.estimator_type as u8);
20653        __tmp.put_i8(self.quality);
20654        if matches!(version, MavlinkVersion::V2) {
20655            let len = __tmp.len();
20656            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20657        } else {
20658            __tmp.len()
20659        }
20660    }
20661}
20662#[doc = "id: 390"]
20663#[doc = "Hardware status sent by an onboard computer."]
20664#[derive(Debug, Clone, PartialEq)]
20665#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20666#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20667pub struct ONBOARD_COMPUTER_STATUS_DATA {
20668    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
20669    pub time_usec: u64,
20670    #[doc = "Time since system boot."]
20671    pub uptime: u32,
20672    #[doc = "Amount of used RAM on the component system. A value of UINT32_MAX implies the field is unused."]
20673    pub ram_usage: u32,
20674    #[doc = "Total amount of RAM on the component system. A value of UINT32_MAX implies the field is unused."]
20675    pub ram_total: u32,
20676    #[doc = "Storage type: 0: HDD, 1: SSD, 2: EMMC, 3: SD card (non-removable), 4: SD card (removable). A value of UINT32_MAX implies the field is unused."]
20677    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20678    pub storage_type: [u32; 4],
20679    #[doc = "Amount of used storage space on the component system. A value of UINT32_MAX implies the field is unused."]
20680    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20681    pub storage_usage: [u32; 4],
20682    #[doc = "Total amount of storage space on the component system. A value of UINT32_MAX implies the field is unused."]
20683    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20684    pub storage_total: [u32; 4],
20685    #[doc = "Link type: 0-9: UART, 10-19: Wired network, 20-29: Wifi, 30-39: Point-to-point proprietary, 40-49: Mesh proprietary"]
20686    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20687    pub link_type: [u32; 6],
20688    #[doc = "Network traffic from the component system. A value of UINT32_MAX implies the field is unused."]
20689    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20690    pub link_tx_rate: [u32; 6],
20691    #[doc = "Network traffic to the component system. A value of UINT32_MAX implies the field is unused."]
20692    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20693    pub link_rx_rate: [u32; 6],
20694    #[doc = "Network capacity from the component system. A value of UINT32_MAX implies the field is unused."]
20695    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20696    pub link_tx_max: [u32; 6],
20697    #[doc = "Network capacity to the component system. A value of UINT32_MAX implies the field is unused."]
20698    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20699    pub link_rx_max: [u32; 6],
20700    #[doc = "Fan speeds. A value of INT16_MAX implies the field is unused."]
20701    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20702    pub fan_speed: [i16; 4],
20703    #[doc = "Type of the onboard computer: 0: Mission computer primary, 1: Mission computer backup 1, 2: Mission computer backup 2, 3: Compute node, 4-5: Compute spares, 6-9: Payload computers."]
20704    pub mavtype: u8,
20705    #[doc = "CPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
20706    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20707    pub cpu_cores: [u8; 8],
20708    #[doc = "Combined CPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
20709    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20710    pub cpu_combined: [u8; 10],
20711    #[doc = "GPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
20712    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20713    pub gpu_cores: [u8; 4],
20714    #[doc = "Combined GPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
20715    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20716    pub gpu_combined: [u8; 10],
20717    #[doc = "Temperature of the board. A value of INT8_MAX implies the field is unused."]
20718    pub temperature_board: i8,
20719    #[doc = "Temperature of the CPU core. A value of INT8_MAX implies the field is unused."]
20720    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20721    pub temperature_core: [i8; 8],
20722}
20723impl ONBOARD_COMPUTER_STATUS_DATA {
20724    pub const ENCODED_LEN: usize = 238usize;
20725    pub const DEFAULT: Self = Self {
20726        time_usec: 0_u64,
20727        uptime: 0_u32,
20728        ram_usage: 0_u32,
20729        ram_total: 0_u32,
20730        storage_type: [0_u32; 4usize],
20731        storage_usage: [0_u32; 4usize],
20732        storage_total: [0_u32; 4usize],
20733        link_type: [0_u32; 6usize],
20734        link_tx_rate: [0_u32; 6usize],
20735        link_rx_rate: [0_u32; 6usize],
20736        link_tx_max: [0_u32; 6usize],
20737        link_rx_max: [0_u32; 6usize],
20738        fan_speed: [0_i16; 4usize],
20739        mavtype: 0_u8,
20740        cpu_cores: [0_u8; 8usize],
20741        cpu_combined: [0_u8; 10usize],
20742        gpu_cores: [0_u8; 4usize],
20743        gpu_combined: [0_u8; 10usize],
20744        temperature_board: 0_i8,
20745        temperature_core: [0_i8; 8usize],
20746    };
20747    #[cfg(feature = "arbitrary")]
20748    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20749        use arbitrary::{Arbitrary, Unstructured};
20750        let mut buf = [0u8; 1024];
20751        rng.fill_bytes(&mut buf);
20752        let mut unstructured = Unstructured::new(&buf);
20753        Self::arbitrary(&mut unstructured).unwrap_or_default()
20754    }
20755}
20756impl Default for ONBOARD_COMPUTER_STATUS_DATA {
20757    fn default() -> Self {
20758        Self::DEFAULT.clone()
20759    }
20760}
20761impl MessageData for ONBOARD_COMPUTER_STATUS_DATA {
20762    type Message = MavMessage;
20763    const ID: u32 = 390u32;
20764    const NAME: &'static str = "ONBOARD_COMPUTER_STATUS";
20765    const EXTRA_CRC: u8 = 156u8;
20766    const ENCODED_LEN: usize = 238usize;
20767    fn deser(
20768        _version: MavlinkVersion,
20769        __input: &[u8],
20770    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20771        let avail_len = __input.len();
20772        let mut payload_buf = [0; Self::ENCODED_LEN];
20773        let mut buf = if avail_len < Self::ENCODED_LEN {
20774            payload_buf[0..avail_len].copy_from_slice(__input);
20775            Bytes::new(&payload_buf)
20776        } else {
20777            Bytes::new(__input)
20778        };
20779        let mut __struct = Self::default();
20780        __struct.time_usec = buf.get_u64_le();
20781        __struct.uptime = buf.get_u32_le();
20782        __struct.ram_usage = buf.get_u32_le();
20783        __struct.ram_total = buf.get_u32_le();
20784        for v in &mut __struct.storage_type {
20785            let val = buf.get_u32_le();
20786            *v = val;
20787        }
20788        for v in &mut __struct.storage_usage {
20789            let val = buf.get_u32_le();
20790            *v = val;
20791        }
20792        for v in &mut __struct.storage_total {
20793            let val = buf.get_u32_le();
20794            *v = val;
20795        }
20796        for v in &mut __struct.link_type {
20797            let val = buf.get_u32_le();
20798            *v = val;
20799        }
20800        for v in &mut __struct.link_tx_rate {
20801            let val = buf.get_u32_le();
20802            *v = val;
20803        }
20804        for v in &mut __struct.link_rx_rate {
20805            let val = buf.get_u32_le();
20806            *v = val;
20807        }
20808        for v in &mut __struct.link_tx_max {
20809            let val = buf.get_u32_le();
20810            *v = val;
20811        }
20812        for v in &mut __struct.link_rx_max {
20813            let val = buf.get_u32_le();
20814            *v = val;
20815        }
20816        for v in &mut __struct.fan_speed {
20817            let val = buf.get_i16_le();
20818            *v = val;
20819        }
20820        __struct.mavtype = buf.get_u8();
20821        for v in &mut __struct.cpu_cores {
20822            let val = buf.get_u8();
20823            *v = val;
20824        }
20825        for v in &mut __struct.cpu_combined {
20826            let val = buf.get_u8();
20827            *v = val;
20828        }
20829        for v in &mut __struct.gpu_cores {
20830            let val = buf.get_u8();
20831            *v = val;
20832        }
20833        for v in &mut __struct.gpu_combined {
20834            let val = buf.get_u8();
20835            *v = val;
20836        }
20837        __struct.temperature_board = buf.get_i8();
20838        for v in &mut __struct.temperature_core {
20839            let val = buf.get_i8();
20840            *v = val;
20841        }
20842        Ok(__struct)
20843    }
20844    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20845        let mut __tmp = BytesMut::new(bytes);
20846        #[allow(clippy::absurd_extreme_comparisons)]
20847        #[allow(unused_comparisons)]
20848        if __tmp.remaining() < Self::ENCODED_LEN {
20849            panic!(
20850                "buffer is too small (need {} bytes, but got {})",
20851                Self::ENCODED_LEN,
20852                __tmp.remaining(),
20853            )
20854        }
20855        __tmp.put_u64_le(self.time_usec);
20856        __tmp.put_u32_le(self.uptime);
20857        __tmp.put_u32_le(self.ram_usage);
20858        __tmp.put_u32_le(self.ram_total);
20859        for val in &self.storage_type {
20860            __tmp.put_u32_le(*val);
20861        }
20862        for val in &self.storage_usage {
20863            __tmp.put_u32_le(*val);
20864        }
20865        for val in &self.storage_total {
20866            __tmp.put_u32_le(*val);
20867        }
20868        for val in &self.link_type {
20869            __tmp.put_u32_le(*val);
20870        }
20871        for val in &self.link_tx_rate {
20872            __tmp.put_u32_le(*val);
20873        }
20874        for val in &self.link_rx_rate {
20875            __tmp.put_u32_le(*val);
20876        }
20877        for val in &self.link_tx_max {
20878            __tmp.put_u32_le(*val);
20879        }
20880        for val in &self.link_rx_max {
20881            __tmp.put_u32_le(*val);
20882        }
20883        for val in &self.fan_speed {
20884            __tmp.put_i16_le(*val);
20885        }
20886        __tmp.put_u8(self.mavtype);
20887        for val in &self.cpu_cores {
20888            __tmp.put_u8(*val);
20889        }
20890        for val in &self.cpu_combined {
20891            __tmp.put_u8(*val);
20892        }
20893        for val in &self.gpu_cores {
20894            __tmp.put_u8(*val);
20895        }
20896        for val in &self.gpu_combined {
20897            __tmp.put_u8(*val);
20898        }
20899        __tmp.put_i8(self.temperature_board);
20900        for val in &self.temperature_core {
20901            __tmp.put_i8(*val);
20902        }
20903        if matches!(version, MavlinkVersion::V2) {
20904            let len = __tmp.len();
20905            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20906        } else {
20907            __tmp.len()
20908        }
20909    }
20910}
20911#[doc = "id: 12918"]
20912#[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
20913#[derive(Debug, Clone, PartialEq)]
20914#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20915#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20916pub struct OPEN_DRONE_ID_ARM_STATUS_DATA {
20917    #[doc = "Status level indicating if arming is allowed."]
20918    pub status: MavOdidArmStatus,
20919    #[doc = "Text error message, should be empty if status is good to arm. Fill with nulls in unused portion."]
20920    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20921    pub error: [u8; 50],
20922}
20923impl OPEN_DRONE_ID_ARM_STATUS_DATA {
20924    pub const ENCODED_LEN: usize = 51usize;
20925    pub const DEFAULT: Self = Self {
20926        status: MavOdidArmStatus::DEFAULT,
20927        error: [0_u8; 50usize],
20928    };
20929    #[cfg(feature = "arbitrary")]
20930    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20931        use arbitrary::{Arbitrary, Unstructured};
20932        let mut buf = [0u8; 1024];
20933        rng.fill_bytes(&mut buf);
20934        let mut unstructured = Unstructured::new(&buf);
20935        Self::arbitrary(&mut unstructured).unwrap_or_default()
20936    }
20937}
20938impl Default for OPEN_DRONE_ID_ARM_STATUS_DATA {
20939    fn default() -> Self {
20940        Self::DEFAULT.clone()
20941    }
20942}
20943impl MessageData for OPEN_DRONE_ID_ARM_STATUS_DATA {
20944    type Message = MavMessage;
20945    const ID: u32 = 12918u32;
20946    const NAME: &'static str = "OPEN_DRONE_ID_ARM_STATUS";
20947    const EXTRA_CRC: u8 = 139u8;
20948    const ENCODED_LEN: usize = 51usize;
20949    fn deser(
20950        _version: MavlinkVersion,
20951        __input: &[u8],
20952    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20953        let avail_len = __input.len();
20954        let mut payload_buf = [0; Self::ENCODED_LEN];
20955        let mut buf = if avail_len < Self::ENCODED_LEN {
20956            payload_buf[0..avail_len].copy_from_slice(__input);
20957            Bytes::new(&payload_buf)
20958        } else {
20959            Bytes::new(__input)
20960        };
20961        let mut __struct = Self::default();
20962        let tmp = buf.get_u8();
20963        __struct.status =
20964            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20965                enum_type: "MavOdidArmStatus",
20966                value: tmp as u32,
20967            })?;
20968        for v in &mut __struct.error {
20969            let val = buf.get_u8();
20970            *v = val;
20971        }
20972        Ok(__struct)
20973    }
20974    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20975        let mut __tmp = BytesMut::new(bytes);
20976        #[allow(clippy::absurd_extreme_comparisons)]
20977        #[allow(unused_comparisons)]
20978        if __tmp.remaining() < Self::ENCODED_LEN {
20979            panic!(
20980                "buffer is too small (need {} bytes, but got {})",
20981                Self::ENCODED_LEN,
20982                __tmp.remaining(),
20983            )
20984        }
20985        __tmp.put_u8(self.status as u8);
20986        for val in &self.error {
20987            __tmp.put_u8(*val);
20988        }
20989        if matches!(version, MavlinkVersion::V2) {
20990            let len = __tmp.len();
20991            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20992        } else {
20993            __tmp.len()
20994        }
20995    }
20996}
20997#[doc = "id: 12902"]
20998#[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
20999#[derive(Debug, Clone, PartialEq)]
21000#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21001#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21002pub struct OPEN_DRONE_ID_AUTHENTICATION_DATA {
21003    #[doc = "This field is only present for page 0. 32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
21004    pub timestamp: u32,
21005    #[doc = "System ID (0 for broadcast)."]
21006    pub target_system: u8,
21007    #[doc = "Component ID (0 for broadcast)."]
21008    pub target_component: u8,
21009    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
21010    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21011    pub id_or_mac: [u8; 20],
21012    #[doc = "Indicates the type of authentication."]
21013    pub authentication_type: MavOdidAuthType,
21014    #[doc = "Allowed range is 0 - 15."]
21015    pub data_page: u8,
21016    #[doc = "This field is only present for page 0. Allowed range is 0 - 15. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
21017    pub last_page_index: u8,
21018    #[doc = "This field is only present for page 0. Total bytes of authentication_data from all data pages. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
21019    pub length: u8,
21020    #[doc = "Opaque authentication data. For page 0, the size is only 17 bytes. For other pages, the size is 23 bytes. Shall be filled with nulls in the unused portion of the field."]
21021    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21022    pub authentication_data: [u8; 23],
21023}
21024impl OPEN_DRONE_ID_AUTHENTICATION_DATA {
21025    pub const ENCODED_LEN: usize = 53usize;
21026    pub const DEFAULT: Self = Self {
21027        timestamp: 0_u32,
21028        target_system: 0_u8,
21029        target_component: 0_u8,
21030        id_or_mac: [0_u8; 20usize],
21031        authentication_type: MavOdidAuthType::DEFAULT,
21032        data_page: 0_u8,
21033        last_page_index: 0_u8,
21034        length: 0_u8,
21035        authentication_data: [0_u8; 23usize],
21036    };
21037    #[cfg(feature = "arbitrary")]
21038    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21039        use arbitrary::{Arbitrary, Unstructured};
21040        let mut buf = [0u8; 1024];
21041        rng.fill_bytes(&mut buf);
21042        let mut unstructured = Unstructured::new(&buf);
21043        Self::arbitrary(&mut unstructured).unwrap_or_default()
21044    }
21045}
21046impl Default for OPEN_DRONE_ID_AUTHENTICATION_DATA {
21047    fn default() -> Self {
21048        Self::DEFAULT.clone()
21049    }
21050}
21051impl MessageData for OPEN_DRONE_ID_AUTHENTICATION_DATA {
21052    type Message = MavMessage;
21053    const ID: u32 = 12902u32;
21054    const NAME: &'static str = "OPEN_DRONE_ID_AUTHENTICATION";
21055    const EXTRA_CRC: u8 = 140u8;
21056    const ENCODED_LEN: usize = 53usize;
21057    fn deser(
21058        _version: MavlinkVersion,
21059        __input: &[u8],
21060    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21061        let avail_len = __input.len();
21062        let mut payload_buf = [0; Self::ENCODED_LEN];
21063        let mut buf = if avail_len < Self::ENCODED_LEN {
21064            payload_buf[0..avail_len].copy_from_slice(__input);
21065            Bytes::new(&payload_buf)
21066        } else {
21067            Bytes::new(__input)
21068        };
21069        let mut __struct = Self::default();
21070        __struct.timestamp = buf.get_u32_le();
21071        __struct.target_system = buf.get_u8();
21072        __struct.target_component = buf.get_u8();
21073        for v in &mut __struct.id_or_mac {
21074            let val = buf.get_u8();
21075            *v = val;
21076        }
21077        let tmp = buf.get_u8();
21078        __struct.authentication_type =
21079            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21080                enum_type: "MavOdidAuthType",
21081                value: tmp as u32,
21082            })?;
21083        __struct.data_page = buf.get_u8();
21084        __struct.last_page_index = buf.get_u8();
21085        __struct.length = buf.get_u8();
21086        for v in &mut __struct.authentication_data {
21087            let val = buf.get_u8();
21088            *v = val;
21089        }
21090        Ok(__struct)
21091    }
21092    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21093        let mut __tmp = BytesMut::new(bytes);
21094        #[allow(clippy::absurd_extreme_comparisons)]
21095        #[allow(unused_comparisons)]
21096        if __tmp.remaining() < Self::ENCODED_LEN {
21097            panic!(
21098                "buffer is too small (need {} bytes, but got {})",
21099                Self::ENCODED_LEN,
21100                __tmp.remaining(),
21101            )
21102        }
21103        __tmp.put_u32_le(self.timestamp);
21104        __tmp.put_u8(self.target_system);
21105        __tmp.put_u8(self.target_component);
21106        for val in &self.id_or_mac {
21107            __tmp.put_u8(*val);
21108        }
21109        __tmp.put_u8(self.authentication_type as u8);
21110        __tmp.put_u8(self.data_page);
21111        __tmp.put_u8(self.last_page_index);
21112        __tmp.put_u8(self.length);
21113        for val in &self.authentication_data {
21114            __tmp.put_u8(*val);
21115        }
21116        if matches!(version, MavlinkVersion::V2) {
21117            let len = __tmp.len();
21118            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21119        } else {
21120            __tmp.len()
21121        }
21122    }
21123}
21124#[doc = "id: 12900"]
21125#[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
21126#[derive(Debug, Clone, PartialEq)]
21127#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21128#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21129pub struct OPEN_DRONE_ID_BASIC_ID_DATA {
21130    #[doc = "System ID (0 for broadcast)."]
21131    pub target_system: u8,
21132    #[doc = "Component ID (0 for broadcast)."]
21133    pub target_component: u8,
21134    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
21135    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21136    pub id_or_mac: [u8; 20],
21137    #[doc = "Indicates the format for the uas_id field of this message."]
21138    pub id_type: MavOdidIdType,
21139    #[doc = "Indicates the type of UA (Unmanned Aircraft)."]
21140    pub ua_type: MavOdidUaType,
21141    #[doc = "UAS (Unmanned Aircraft System) ID following the format specified by id_type. Shall be filled with nulls in the unused portion of the field."]
21142    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21143    pub uas_id: [u8; 20],
21144}
21145impl OPEN_DRONE_ID_BASIC_ID_DATA {
21146    pub const ENCODED_LEN: usize = 44usize;
21147    pub const DEFAULT: Self = Self {
21148        target_system: 0_u8,
21149        target_component: 0_u8,
21150        id_or_mac: [0_u8; 20usize],
21151        id_type: MavOdidIdType::DEFAULT,
21152        ua_type: MavOdidUaType::DEFAULT,
21153        uas_id: [0_u8; 20usize],
21154    };
21155    #[cfg(feature = "arbitrary")]
21156    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21157        use arbitrary::{Arbitrary, Unstructured};
21158        let mut buf = [0u8; 1024];
21159        rng.fill_bytes(&mut buf);
21160        let mut unstructured = Unstructured::new(&buf);
21161        Self::arbitrary(&mut unstructured).unwrap_or_default()
21162    }
21163}
21164impl Default for OPEN_DRONE_ID_BASIC_ID_DATA {
21165    fn default() -> Self {
21166        Self::DEFAULT.clone()
21167    }
21168}
21169impl MessageData for OPEN_DRONE_ID_BASIC_ID_DATA {
21170    type Message = MavMessage;
21171    const ID: u32 = 12900u32;
21172    const NAME: &'static str = "OPEN_DRONE_ID_BASIC_ID";
21173    const EXTRA_CRC: u8 = 114u8;
21174    const ENCODED_LEN: usize = 44usize;
21175    fn deser(
21176        _version: MavlinkVersion,
21177        __input: &[u8],
21178    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21179        let avail_len = __input.len();
21180        let mut payload_buf = [0; Self::ENCODED_LEN];
21181        let mut buf = if avail_len < Self::ENCODED_LEN {
21182            payload_buf[0..avail_len].copy_from_slice(__input);
21183            Bytes::new(&payload_buf)
21184        } else {
21185            Bytes::new(__input)
21186        };
21187        let mut __struct = Self::default();
21188        __struct.target_system = buf.get_u8();
21189        __struct.target_component = buf.get_u8();
21190        for v in &mut __struct.id_or_mac {
21191            let val = buf.get_u8();
21192            *v = val;
21193        }
21194        let tmp = buf.get_u8();
21195        __struct.id_type =
21196            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21197                enum_type: "MavOdidIdType",
21198                value: tmp as u32,
21199            })?;
21200        let tmp = buf.get_u8();
21201        __struct.ua_type =
21202            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21203                enum_type: "MavOdidUaType",
21204                value: tmp as u32,
21205            })?;
21206        for v in &mut __struct.uas_id {
21207            let val = buf.get_u8();
21208            *v = val;
21209        }
21210        Ok(__struct)
21211    }
21212    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21213        let mut __tmp = BytesMut::new(bytes);
21214        #[allow(clippy::absurd_extreme_comparisons)]
21215        #[allow(unused_comparisons)]
21216        if __tmp.remaining() < Self::ENCODED_LEN {
21217            panic!(
21218                "buffer is too small (need {} bytes, but got {})",
21219                Self::ENCODED_LEN,
21220                __tmp.remaining(),
21221            )
21222        }
21223        __tmp.put_u8(self.target_system);
21224        __tmp.put_u8(self.target_component);
21225        for val in &self.id_or_mac {
21226            __tmp.put_u8(*val);
21227        }
21228        __tmp.put_u8(self.id_type as u8);
21229        __tmp.put_u8(self.ua_type as u8);
21230        for val in &self.uas_id {
21231            __tmp.put_u8(*val);
21232        }
21233        if matches!(version, MavlinkVersion::V2) {
21234            let len = __tmp.len();
21235            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21236        } else {
21237            __tmp.len()
21238        }
21239    }
21240}
21241#[doc = "id: 12901"]
21242#[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
21243#[derive(Debug, Clone, PartialEq)]
21244#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21245#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21246pub struct OPEN_DRONE_ID_LOCATION_DATA {
21247    #[doc = "Current latitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
21248    pub latitude: i32,
21249    #[doc = "Current longitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
21250    pub longitude: i32,
21251    #[doc = "The altitude calculated from the barometric pressue. Reference is against 29.92inHg or 1013.2mb. If unknown: -1000 m."]
21252    pub altitude_barometric: f32,
21253    #[doc = "The geodetic altitude as defined by WGS84. If unknown: -1000 m."]
21254    pub altitude_geodetic: f32,
21255    #[doc = "The current height of the unmanned aircraft above the take-off location or the ground as indicated by height_reference. If unknown: -1000 m."]
21256    pub height: f32,
21257    #[doc = "Seconds after the full hour with reference to UTC time. Typically the GPS outputs a time-of-week value in milliseconds. First convert that to UTC and then convert for this field using ((float) (time_week_ms % (60*60*1000))) / 1000. If unknown: 0xFFFF."]
21258    pub timestamp: f32,
21259    #[doc = "Direction over ground (not heading, but direction of movement) measured clockwise from true North: 0 - 35999 centi-degrees. If unknown: 36100 centi-degrees."]
21260    pub direction: u16,
21261    #[doc = "Ground speed. Positive only. If unknown: 25500 cm/s. If speed is larger than 25425 cm/s, use 25425 cm/s."]
21262    pub speed_horizontal: u16,
21263    #[doc = "The vertical speed. Up is positive. If unknown: 6300 cm/s. If speed is larger than 6200 cm/s, use 6200 cm/s. If lower than -6200 cm/s, use -6200 cm/s."]
21264    pub speed_vertical: i16,
21265    #[doc = "System ID (0 for broadcast)."]
21266    pub target_system: u8,
21267    #[doc = "Component ID (0 for broadcast)."]
21268    pub target_component: u8,
21269    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
21270    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21271    pub id_or_mac: [u8; 20],
21272    #[doc = "Indicates whether the unmanned aircraft is on the ground or in the air."]
21273    pub status: MavOdidStatus,
21274    #[doc = "Indicates the reference point for the height field."]
21275    pub height_reference: MavOdidHeightRef,
21276    #[doc = "The accuracy of the horizontal position."]
21277    pub horizontal_accuracy: MavOdidHorAcc,
21278    #[doc = "The accuracy of the vertical position."]
21279    pub vertical_accuracy: MavOdidVerAcc,
21280    #[doc = "The accuracy of the barometric altitude."]
21281    pub barometer_accuracy: MavOdidVerAcc,
21282    #[doc = "The accuracy of the horizontal and vertical speed."]
21283    pub speed_accuracy: MavOdidSpeedAcc,
21284    #[doc = "The accuracy of the timestamps."]
21285    pub timestamp_accuracy: MavOdidTimeAcc,
21286}
21287impl OPEN_DRONE_ID_LOCATION_DATA {
21288    pub const ENCODED_LEN: usize = 59usize;
21289    pub const DEFAULT: Self = Self {
21290        latitude: 0_i32,
21291        longitude: 0_i32,
21292        altitude_barometric: 0.0_f32,
21293        altitude_geodetic: 0.0_f32,
21294        height: 0.0_f32,
21295        timestamp: 0.0_f32,
21296        direction: 0_u16,
21297        speed_horizontal: 0_u16,
21298        speed_vertical: 0_i16,
21299        target_system: 0_u8,
21300        target_component: 0_u8,
21301        id_or_mac: [0_u8; 20usize],
21302        status: MavOdidStatus::DEFAULT,
21303        height_reference: MavOdidHeightRef::DEFAULT,
21304        horizontal_accuracy: MavOdidHorAcc::DEFAULT,
21305        vertical_accuracy: MavOdidVerAcc::DEFAULT,
21306        barometer_accuracy: MavOdidVerAcc::DEFAULT,
21307        speed_accuracy: MavOdidSpeedAcc::DEFAULT,
21308        timestamp_accuracy: MavOdidTimeAcc::DEFAULT,
21309    };
21310    #[cfg(feature = "arbitrary")]
21311    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21312        use arbitrary::{Arbitrary, Unstructured};
21313        let mut buf = [0u8; 1024];
21314        rng.fill_bytes(&mut buf);
21315        let mut unstructured = Unstructured::new(&buf);
21316        Self::arbitrary(&mut unstructured).unwrap_or_default()
21317    }
21318}
21319impl Default for OPEN_DRONE_ID_LOCATION_DATA {
21320    fn default() -> Self {
21321        Self::DEFAULT.clone()
21322    }
21323}
21324impl MessageData for OPEN_DRONE_ID_LOCATION_DATA {
21325    type Message = MavMessage;
21326    const ID: u32 = 12901u32;
21327    const NAME: &'static str = "OPEN_DRONE_ID_LOCATION";
21328    const EXTRA_CRC: u8 = 254u8;
21329    const ENCODED_LEN: usize = 59usize;
21330    fn deser(
21331        _version: MavlinkVersion,
21332        __input: &[u8],
21333    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21334        let avail_len = __input.len();
21335        let mut payload_buf = [0; Self::ENCODED_LEN];
21336        let mut buf = if avail_len < Self::ENCODED_LEN {
21337            payload_buf[0..avail_len].copy_from_slice(__input);
21338            Bytes::new(&payload_buf)
21339        } else {
21340            Bytes::new(__input)
21341        };
21342        let mut __struct = Self::default();
21343        __struct.latitude = buf.get_i32_le();
21344        __struct.longitude = buf.get_i32_le();
21345        __struct.altitude_barometric = buf.get_f32_le();
21346        __struct.altitude_geodetic = buf.get_f32_le();
21347        __struct.height = buf.get_f32_le();
21348        __struct.timestamp = buf.get_f32_le();
21349        __struct.direction = buf.get_u16_le();
21350        __struct.speed_horizontal = buf.get_u16_le();
21351        __struct.speed_vertical = buf.get_i16_le();
21352        __struct.target_system = buf.get_u8();
21353        __struct.target_component = buf.get_u8();
21354        for v in &mut __struct.id_or_mac {
21355            let val = buf.get_u8();
21356            *v = val;
21357        }
21358        let tmp = buf.get_u8();
21359        __struct.status =
21360            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21361                enum_type: "MavOdidStatus",
21362                value: tmp as u32,
21363            })?;
21364        let tmp = buf.get_u8();
21365        __struct.height_reference =
21366            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21367                enum_type: "MavOdidHeightRef",
21368                value: tmp as u32,
21369            })?;
21370        let tmp = buf.get_u8();
21371        __struct.horizontal_accuracy =
21372            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21373                enum_type: "MavOdidHorAcc",
21374                value: tmp as u32,
21375            })?;
21376        let tmp = buf.get_u8();
21377        __struct.vertical_accuracy =
21378            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21379                enum_type: "MavOdidVerAcc",
21380                value: tmp as u32,
21381            })?;
21382        let tmp = buf.get_u8();
21383        __struct.barometer_accuracy =
21384            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21385                enum_type: "MavOdidVerAcc",
21386                value: tmp as u32,
21387            })?;
21388        let tmp = buf.get_u8();
21389        __struct.speed_accuracy =
21390            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21391                enum_type: "MavOdidSpeedAcc",
21392                value: tmp as u32,
21393            })?;
21394        let tmp = buf.get_u8();
21395        __struct.timestamp_accuracy =
21396            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21397                enum_type: "MavOdidTimeAcc",
21398                value: tmp as u32,
21399            })?;
21400        Ok(__struct)
21401    }
21402    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21403        let mut __tmp = BytesMut::new(bytes);
21404        #[allow(clippy::absurd_extreme_comparisons)]
21405        #[allow(unused_comparisons)]
21406        if __tmp.remaining() < Self::ENCODED_LEN {
21407            panic!(
21408                "buffer is too small (need {} bytes, but got {})",
21409                Self::ENCODED_LEN,
21410                __tmp.remaining(),
21411            )
21412        }
21413        __tmp.put_i32_le(self.latitude);
21414        __tmp.put_i32_le(self.longitude);
21415        __tmp.put_f32_le(self.altitude_barometric);
21416        __tmp.put_f32_le(self.altitude_geodetic);
21417        __tmp.put_f32_le(self.height);
21418        __tmp.put_f32_le(self.timestamp);
21419        __tmp.put_u16_le(self.direction);
21420        __tmp.put_u16_le(self.speed_horizontal);
21421        __tmp.put_i16_le(self.speed_vertical);
21422        __tmp.put_u8(self.target_system);
21423        __tmp.put_u8(self.target_component);
21424        for val in &self.id_or_mac {
21425            __tmp.put_u8(*val);
21426        }
21427        __tmp.put_u8(self.status as u8);
21428        __tmp.put_u8(self.height_reference as u8);
21429        __tmp.put_u8(self.horizontal_accuracy as u8);
21430        __tmp.put_u8(self.vertical_accuracy as u8);
21431        __tmp.put_u8(self.barometer_accuracy as u8);
21432        __tmp.put_u8(self.speed_accuracy as u8);
21433        __tmp.put_u8(self.timestamp_accuracy as u8);
21434        if matches!(version, MavlinkVersion::V2) {
21435            let len = __tmp.len();
21436            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21437        } else {
21438            __tmp.len()
21439        }
21440    }
21441}
21442#[doc = "id: 12915"]
21443#[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
21444#[derive(Debug, Clone, PartialEq)]
21445#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21446#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21447pub struct OPEN_DRONE_ID_MESSAGE_PACK_DATA {
21448    #[doc = "System ID (0 for broadcast)."]
21449    pub target_system: u8,
21450    #[doc = "Component ID (0 for broadcast)."]
21451    pub target_component: u8,
21452    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
21453    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21454    pub id_or_mac: [u8; 20],
21455    #[doc = "This field must currently always be equal to 25 (bytes), since all encoded OpenDroneID messages are specified to have this length."]
21456    pub single_message_size: u8,
21457    #[doc = "Number of encoded messages in the pack (not the number of bytes). Allowed range is 1 - 9."]
21458    pub msg_pack_size: u8,
21459    #[doc = "Concatenation of encoded OpenDroneID messages. Shall be filled with nulls in the unused portion of the field."]
21460    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21461    pub messages: [u8; 225],
21462}
21463impl OPEN_DRONE_ID_MESSAGE_PACK_DATA {
21464    pub const ENCODED_LEN: usize = 249usize;
21465    pub const DEFAULT: Self = Self {
21466        target_system: 0_u8,
21467        target_component: 0_u8,
21468        id_or_mac: [0_u8; 20usize],
21469        single_message_size: 0_u8,
21470        msg_pack_size: 0_u8,
21471        messages: [0_u8; 225usize],
21472    };
21473    #[cfg(feature = "arbitrary")]
21474    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21475        use arbitrary::{Arbitrary, Unstructured};
21476        let mut buf = [0u8; 1024];
21477        rng.fill_bytes(&mut buf);
21478        let mut unstructured = Unstructured::new(&buf);
21479        Self::arbitrary(&mut unstructured).unwrap_or_default()
21480    }
21481}
21482impl Default for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
21483    fn default() -> Self {
21484        Self::DEFAULT.clone()
21485    }
21486}
21487impl MessageData for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
21488    type Message = MavMessage;
21489    const ID: u32 = 12915u32;
21490    const NAME: &'static str = "OPEN_DRONE_ID_MESSAGE_PACK";
21491    const EXTRA_CRC: u8 = 94u8;
21492    const ENCODED_LEN: usize = 249usize;
21493    fn deser(
21494        _version: MavlinkVersion,
21495        __input: &[u8],
21496    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21497        let avail_len = __input.len();
21498        let mut payload_buf = [0; Self::ENCODED_LEN];
21499        let mut buf = if avail_len < Self::ENCODED_LEN {
21500            payload_buf[0..avail_len].copy_from_slice(__input);
21501            Bytes::new(&payload_buf)
21502        } else {
21503            Bytes::new(__input)
21504        };
21505        let mut __struct = Self::default();
21506        __struct.target_system = buf.get_u8();
21507        __struct.target_component = buf.get_u8();
21508        for v in &mut __struct.id_or_mac {
21509            let val = buf.get_u8();
21510            *v = val;
21511        }
21512        __struct.single_message_size = buf.get_u8();
21513        __struct.msg_pack_size = buf.get_u8();
21514        for v in &mut __struct.messages {
21515            let val = buf.get_u8();
21516            *v = val;
21517        }
21518        Ok(__struct)
21519    }
21520    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21521        let mut __tmp = BytesMut::new(bytes);
21522        #[allow(clippy::absurd_extreme_comparisons)]
21523        #[allow(unused_comparisons)]
21524        if __tmp.remaining() < Self::ENCODED_LEN {
21525            panic!(
21526                "buffer is too small (need {} bytes, but got {})",
21527                Self::ENCODED_LEN,
21528                __tmp.remaining(),
21529            )
21530        }
21531        __tmp.put_u8(self.target_system);
21532        __tmp.put_u8(self.target_component);
21533        for val in &self.id_or_mac {
21534            __tmp.put_u8(*val);
21535        }
21536        __tmp.put_u8(self.single_message_size);
21537        __tmp.put_u8(self.msg_pack_size);
21538        for val in &self.messages {
21539            __tmp.put_u8(*val);
21540        }
21541        if matches!(version, MavlinkVersion::V2) {
21542            let len = __tmp.len();
21543            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21544        } else {
21545            __tmp.len()
21546        }
21547    }
21548}
21549#[doc = "id: 12905"]
21550#[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
21551#[derive(Debug, Clone, PartialEq)]
21552#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21553#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21554pub struct OPEN_DRONE_ID_OPERATOR_ID_DATA {
21555    #[doc = "System ID (0 for broadcast)."]
21556    pub target_system: u8,
21557    #[doc = "Component ID (0 for broadcast)."]
21558    pub target_component: u8,
21559    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
21560    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21561    pub id_or_mac: [u8; 20],
21562    #[doc = "Indicates the type of the operator_id field."]
21563    pub operator_id_type: MavOdidOperatorIdType,
21564    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
21565    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21566    pub operator_id: [u8; 20],
21567}
21568impl OPEN_DRONE_ID_OPERATOR_ID_DATA {
21569    pub const ENCODED_LEN: usize = 43usize;
21570    pub const DEFAULT: Self = Self {
21571        target_system: 0_u8,
21572        target_component: 0_u8,
21573        id_or_mac: [0_u8; 20usize],
21574        operator_id_type: MavOdidOperatorIdType::DEFAULT,
21575        operator_id: [0_u8; 20usize],
21576    };
21577    #[cfg(feature = "arbitrary")]
21578    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21579        use arbitrary::{Arbitrary, Unstructured};
21580        let mut buf = [0u8; 1024];
21581        rng.fill_bytes(&mut buf);
21582        let mut unstructured = Unstructured::new(&buf);
21583        Self::arbitrary(&mut unstructured).unwrap_or_default()
21584    }
21585}
21586impl Default for OPEN_DRONE_ID_OPERATOR_ID_DATA {
21587    fn default() -> Self {
21588        Self::DEFAULT.clone()
21589    }
21590}
21591impl MessageData for OPEN_DRONE_ID_OPERATOR_ID_DATA {
21592    type Message = MavMessage;
21593    const ID: u32 = 12905u32;
21594    const NAME: &'static str = "OPEN_DRONE_ID_OPERATOR_ID";
21595    const EXTRA_CRC: u8 = 49u8;
21596    const ENCODED_LEN: usize = 43usize;
21597    fn deser(
21598        _version: MavlinkVersion,
21599        __input: &[u8],
21600    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21601        let avail_len = __input.len();
21602        let mut payload_buf = [0; Self::ENCODED_LEN];
21603        let mut buf = if avail_len < Self::ENCODED_LEN {
21604            payload_buf[0..avail_len].copy_from_slice(__input);
21605            Bytes::new(&payload_buf)
21606        } else {
21607            Bytes::new(__input)
21608        };
21609        let mut __struct = Self::default();
21610        __struct.target_system = buf.get_u8();
21611        __struct.target_component = buf.get_u8();
21612        for v in &mut __struct.id_or_mac {
21613            let val = buf.get_u8();
21614            *v = val;
21615        }
21616        let tmp = buf.get_u8();
21617        __struct.operator_id_type =
21618            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21619                enum_type: "MavOdidOperatorIdType",
21620                value: tmp as u32,
21621            })?;
21622        for v in &mut __struct.operator_id {
21623            let val = buf.get_u8();
21624            *v = val;
21625        }
21626        Ok(__struct)
21627    }
21628    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21629        let mut __tmp = BytesMut::new(bytes);
21630        #[allow(clippy::absurd_extreme_comparisons)]
21631        #[allow(unused_comparisons)]
21632        if __tmp.remaining() < Self::ENCODED_LEN {
21633            panic!(
21634                "buffer is too small (need {} bytes, but got {})",
21635                Self::ENCODED_LEN,
21636                __tmp.remaining(),
21637            )
21638        }
21639        __tmp.put_u8(self.target_system);
21640        __tmp.put_u8(self.target_component);
21641        for val in &self.id_or_mac {
21642            __tmp.put_u8(*val);
21643        }
21644        __tmp.put_u8(self.operator_id_type as u8);
21645        for val in &self.operator_id {
21646            __tmp.put_u8(*val);
21647        }
21648        if matches!(version, MavlinkVersion::V2) {
21649            let len = __tmp.len();
21650            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21651        } else {
21652            __tmp.len()
21653        }
21654    }
21655}
21656#[doc = "id: 12903"]
21657#[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
21658#[derive(Debug, Clone, PartialEq)]
21659#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21660#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21661pub struct OPEN_DRONE_ID_SELF_ID_DATA {
21662    #[doc = "System ID (0 for broadcast)."]
21663    pub target_system: u8,
21664    #[doc = "Component ID (0 for broadcast)."]
21665    pub target_component: u8,
21666    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
21667    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21668    pub id_or_mac: [u8; 20],
21669    #[doc = "Indicates the type of the description field."]
21670    pub description_type: MavOdidDescType,
21671    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
21672    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21673    pub description: [u8; 23],
21674}
21675impl OPEN_DRONE_ID_SELF_ID_DATA {
21676    pub const ENCODED_LEN: usize = 46usize;
21677    pub const DEFAULT: Self = Self {
21678        target_system: 0_u8,
21679        target_component: 0_u8,
21680        id_or_mac: [0_u8; 20usize],
21681        description_type: MavOdidDescType::DEFAULT,
21682        description: [0_u8; 23usize],
21683    };
21684    #[cfg(feature = "arbitrary")]
21685    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21686        use arbitrary::{Arbitrary, Unstructured};
21687        let mut buf = [0u8; 1024];
21688        rng.fill_bytes(&mut buf);
21689        let mut unstructured = Unstructured::new(&buf);
21690        Self::arbitrary(&mut unstructured).unwrap_or_default()
21691    }
21692}
21693impl Default for OPEN_DRONE_ID_SELF_ID_DATA {
21694    fn default() -> Self {
21695        Self::DEFAULT.clone()
21696    }
21697}
21698impl MessageData for OPEN_DRONE_ID_SELF_ID_DATA {
21699    type Message = MavMessage;
21700    const ID: u32 = 12903u32;
21701    const NAME: &'static str = "OPEN_DRONE_ID_SELF_ID";
21702    const EXTRA_CRC: u8 = 249u8;
21703    const ENCODED_LEN: usize = 46usize;
21704    fn deser(
21705        _version: MavlinkVersion,
21706        __input: &[u8],
21707    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21708        let avail_len = __input.len();
21709        let mut payload_buf = [0; Self::ENCODED_LEN];
21710        let mut buf = if avail_len < Self::ENCODED_LEN {
21711            payload_buf[0..avail_len].copy_from_slice(__input);
21712            Bytes::new(&payload_buf)
21713        } else {
21714            Bytes::new(__input)
21715        };
21716        let mut __struct = Self::default();
21717        __struct.target_system = buf.get_u8();
21718        __struct.target_component = buf.get_u8();
21719        for v in &mut __struct.id_or_mac {
21720            let val = buf.get_u8();
21721            *v = val;
21722        }
21723        let tmp = buf.get_u8();
21724        __struct.description_type =
21725            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21726                enum_type: "MavOdidDescType",
21727                value: tmp as u32,
21728            })?;
21729        for v in &mut __struct.description {
21730            let val = buf.get_u8();
21731            *v = val;
21732        }
21733        Ok(__struct)
21734    }
21735    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21736        let mut __tmp = BytesMut::new(bytes);
21737        #[allow(clippy::absurd_extreme_comparisons)]
21738        #[allow(unused_comparisons)]
21739        if __tmp.remaining() < Self::ENCODED_LEN {
21740            panic!(
21741                "buffer is too small (need {} bytes, but got {})",
21742                Self::ENCODED_LEN,
21743                __tmp.remaining(),
21744            )
21745        }
21746        __tmp.put_u8(self.target_system);
21747        __tmp.put_u8(self.target_component);
21748        for val in &self.id_or_mac {
21749            __tmp.put_u8(*val);
21750        }
21751        __tmp.put_u8(self.description_type as u8);
21752        for val in &self.description {
21753            __tmp.put_u8(*val);
21754        }
21755        if matches!(version, MavlinkVersion::V2) {
21756            let len = __tmp.len();
21757            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21758        } else {
21759            __tmp.len()
21760        }
21761    }
21762}
21763#[doc = "id: 12904"]
21764#[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
21765#[derive(Debug, Clone, PartialEq)]
21766#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21767#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21768pub struct OPEN_DRONE_ID_SYSTEM_DATA {
21769    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
21770    pub operator_latitude: i32,
21771    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
21772    pub operator_longitude: i32,
21773    #[doc = "Area Operations Ceiling relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
21774    pub area_ceiling: f32,
21775    #[doc = "Area Operations Floor relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
21776    pub area_floor: f32,
21777    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
21778    pub operator_altitude_geo: f32,
21779    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
21780    pub timestamp: u32,
21781    #[doc = "Number of aircraft in the area, group or formation (default 1). Used only for swarms/multiple UA."]
21782    pub area_count: u16,
21783    #[doc = "Radius of the cylindrical area of the group or formation (default 0). Used only for swarms/multiple UA."]
21784    pub area_radius: u16,
21785    #[doc = "System ID (0 for broadcast)."]
21786    pub target_system: u8,
21787    #[doc = "Component ID (0 for broadcast)."]
21788    pub target_component: u8,
21789    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
21790    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21791    pub id_or_mac: [u8; 20],
21792    #[doc = "Specifies the operator location type."]
21793    pub operator_location_type: MavOdidOperatorLocationType,
21794    #[doc = "Specifies the classification type of the UA."]
21795    pub classification_type: MavOdidClassificationType,
21796    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the category of the UA."]
21797    pub category_eu: MavOdidCategoryEu,
21798    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the class of the UA."]
21799    pub class_eu: MavOdidClassEu,
21800}
21801impl OPEN_DRONE_ID_SYSTEM_DATA {
21802    pub const ENCODED_LEN: usize = 54usize;
21803    pub const DEFAULT: Self = Self {
21804        operator_latitude: 0_i32,
21805        operator_longitude: 0_i32,
21806        area_ceiling: 0.0_f32,
21807        area_floor: 0.0_f32,
21808        operator_altitude_geo: 0.0_f32,
21809        timestamp: 0_u32,
21810        area_count: 0_u16,
21811        area_radius: 0_u16,
21812        target_system: 0_u8,
21813        target_component: 0_u8,
21814        id_or_mac: [0_u8; 20usize],
21815        operator_location_type: MavOdidOperatorLocationType::DEFAULT,
21816        classification_type: MavOdidClassificationType::DEFAULT,
21817        category_eu: MavOdidCategoryEu::DEFAULT,
21818        class_eu: MavOdidClassEu::DEFAULT,
21819    };
21820    #[cfg(feature = "arbitrary")]
21821    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21822        use arbitrary::{Arbitrary, Unstructured};
21823        let mut buf = [0u8; 1024];
21824        rng.fill_bytes(&mut buf);
21825        let mut unstructured = Unstructured::new(&buf);
21826        Self::arbitrary(&mut unstructured).unwrap_or_default()
21827    }
21828}
21829impl Default for OPEN_DRONE_ID_SYSTEM_DATA {
21830    fn default() -> Self {
21831        Self::DEFAULT.clone()
21832    }
21833}
21834impl MessageData for OPEN_DRONE_ID_SYSTEM_DATA {
21835    type Message = MavMessage;
21836    const ID: u32 = 12904u32;
21837    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM";
21838    const EXTRA_CRC: u8 = 77u8;
21839    const ENCODED_LEN: usize = 54usize;
21840    fn deser(
21841        _version: MavlinkVersion,
21842        __input: &[u8],
21843    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21844        let avail_len = __input.len();
21845        let mut payload_buf = [0; Self::ENCODED_LEN];
21846        let mut buf = if avail_len < Self::ENCODED_LEN {
21847            payload_buf[0..avail_len].copy_from_slice(__input);
21848            Bytes::new(&payload_buf)
21849        } else {
21850            Bytes::new(__input)
21851        };
21852        let mut __struct = Self::default();
21853        __struct.operator_latitude = buf.get_i32_le();
21854        __struct.operator_longitude = buf.get_i32_le();
21855        __struct.area_ceiling = buf.get_f32_le();
21856        __struct.area_floor = buf.get_f32_le();
21857        __struct.operator_altitude_geo = buf.get_f32_le();
21858        __struct.timestamp = buf.get_u32_le();
21859        __struct.area_count = buf.get_u16_le();
21860        __struct.area_radius = buf.get_u16_le();
21861        __struct.target_system = buf.get_u8();
21862        __struct.target_component = buf.get_u8();
21863        for v in &mut __struct.id_or_mac {
21864            let val = buf.get_u8();
21865            *v = val;
21866        }
21867        let tmp = buf.get_u8();
21868        __struct.operator_location_type =
21869            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21870                enum_type: "MavOdidOperatorLocationType",
21871                value: tmp as u32,
21872            })?;
21873        let tmp = buf.get_u8();
21874        __struct.classification_type =
21875            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21876                enum_type: "MavOdidClassificationType",
21877                value: tmp as u32,
21878            })?;
21879        let tmp = buf.get_u8();
21880        __struct.category_eu =
21881            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21882                enum_type: "MavOdidCategoryEu",
21883                value: tmp as u32,
21884            })?;
21885        let tmp = buf.get_u8();
21886        __struct.class_eu =
21887            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21888                enum_type: "MavOdidClassEu",
21889                value: tmp as u32,
21890            })?;
21891        Ok(__struct)
21892    }
21893    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21894        let mut __tmp = BytesMut::new(bytes);
21895        #[allow(clippy::absurd_extreme_comparisons)]
21896        #[allow(unused_comparisons)]
21897        if __tmp.remaining() < Self::ENCODED_LEN {
21898            panic!(
21899                "buffer is too small (need {} bytes, but got {})",
21900                Self::ENCODED_LEN,
21901                __tmp.remaining(),
21902            )
21903        }
21904        __tmp.put_i32_le(self.operator_latitude);
21905        __tmp.put_i32_le(self.operator_longitude);
21906        __tmp.put_f32_le(self.area_ceiling);
21907        __tmp.put_f32_le(self.area_floor);
21908        __tmp.put_f32_le(self.operator_altitude_geo);
21909        __tmp.put_u32_le(self.timestamp);
21910        __tmp.put_u16_le(self.area_count);
21911        __tmp.put_u16_le(self.area_radius);
21912        __tmp.put_u8(self.target_system);
21913        __tmp.put_u8(self.target_component);
21914        for val in &self.id_or_mac {
21915            __tmp.put_u8(*val);
21916        }
21917        __tmp.put_u8(self.operator_location_type as u8);
21918        __tmp.put_u8(self.classification_type as u8);
21919        __tmp.put_u8(self.category_eu as u8);
21920        __tmp.put_u8(self.class_eu as u8);
21921        if matches!(version, MavlinkVersion::V2) {
21922            let len = __tmp.len();
21923            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21924        } else {
21925            __tmp.len()
21926        }
21927    }
21928}
21929#[doc = "id: 12919"]
21930#[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
21931#[derive(Debug, Clone, PartialEq)]
21932#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21933#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21934pub struct OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
21935    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
21936    pub operator_latitude: i32,
21937    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
21938    pub operator_longitude: i32,
21939    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
21940    pub operator_altitude_geo: f32,
21941    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
21942    pub timestamp: u32,
21943    #[doc = "System ID (0 for broadcast)."]
21944    pub target_system: u8,
21945    #[doc = "Component ID (0 for broadcast)."]
21946    pub target_component: u8,
21947}
21948impl OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
21949    pub const ENCODED_LEN: usize = 18usize;
21950    pub const DEFAULT: Self = Self {
21951        operator_latitude: 0_i32,
21952        operator_longitude: 0_i32,
21953        operator_altitude_geo: 0.0_f32,
21954        timestamp: 0_u32,
21955        target_system: 0_u8,
21956        target_component: 0_u8,
21957    };
21958    #[cfg(feature = "arbitrary")]
21959    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21960        use arbitrary::{Arbitrary, Unstructured};
21961        let mut buf = [0u8; 1024];
21962        rng.fill_bytes(&mut buf);
21963        let mut unstructured = Unstructured::new(&buf);
21964        Self::arbitrary(&mut unstructured).unwrap_or_default()
21965    }
21966}
21967impl Default for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
21968    fn default() -> Self {
21969        Self::DEFAULT.clone()
21970    }
21971}
21972impl MessageData for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
21973    type Message = MavMessage;
21974    const ID: u32 = 12919u32;
21975    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM_UPDATE";
21976    const EXTRA_CRC: u8 = 7u8;
21977    const ENCODED_LEN: usize = 18usize;
21978    fn deser(
21979        _version: MavlinkVersion,
21980        __input: &[u8],
21981    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21982        let avail_len = __input.len();
21983        let mut payload_buf = [0; Self::ENCODED_LEN];
21984        let mut buf = if avail_len < Self::ENCODED_LEN {
21985            payload_buf[0..avail_len].copy_from_slice(__input);
21986            Bytes::new(&payload_buf)
21987        } else {
21988            Bytes::new(__input)
21989        };
21990        let mut __struct = Self::default();
21991        __struct.operator_latitude = buf.get_i32_le();
21992        __struct.operator_longitude = buf.get_i32_le();
21993        __struct.operator_altitude_geo = buf.get_f32_le();
21994        __struct.timestamp = buf.get_u32_le();
21995        __struct.target_system = buf.get_u8();
21996        __struct.target_component = buf.get_u8();
21997        Ok(__struct)
21998    }
21999    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22000        let mut __tmp = BytesMut::new(bytes);
22001        #[allow(clippy::absurd_extreme_comparisons)]
22002        #[allow(unused_comparisons)]
22003        if __tmp.remaining() < Self::ENCODED_LEN {
22004            panic!(
22005                "buffer is too small (need {} bytes, but got {})",
22006                Self::ENCODED_LEN,
22007                __tmp.remaining(),
22008            )
22009        }
22010        __tmp.put_i32_le(self.operator_latitude);
22011        __tmp.put_i32_le(self.operator_longitude);
22012        __tmp.put_f32_le(self.operator_altitude_geo);
22013        __tmp.put_u32_le(self.timestamp);
22014        __tmp.put_u8(self.target_system);
22015        __tmp.put_u8(self.target_component);
22016        if matches!(version, MavlinkVersion::V2) {
22017            let len = __tmp.len();
22018            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22019        } else {
22020            __tmp.len()
22021        }
22022    }
22023}
22024#[doc = "id: 100"]
22025#[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
22026#[derive(Debug, Clone, PartialEq)]
22027#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22028#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22029pub struct OPTICAL_FLOW_DATA {
22030    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22031    pub time_usec: u64,
22032    #[doc = "Flow in x-sensor direction, angular-speed compensated"]
22033    pub flow_comp_m_x: f32,
22034    #[doc = "Flow in y-sensor direction, angular-speed compensated"]
22035    pub flow_comp_m_y: f32,
22036    #[doc = "Ground distance. Positive value: distance known. Negative value: Unknown distance"]
22037    pub ground_distance: f32,
22038    #[doc = "Flow in x-sensor direction"]
22039    pub flow_x: i16,
22040    #[doc = "Flow in y-sensor direction"]
22041    pub flow_y: i16,
22042    #[doc = "Sensor ID"]
22043    pub sensor_id: u8,
22044    #[doc = "Optical flow quality / confidence. 0: bad, 255: maximum quality"]
22045    pub quality: u8,
22046    #[doc = "Flow rate about X axis"]
22047    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22048    pub flow_rate_x: f32,
22049    #[doc = "Flow rate about Y axis"]
22050    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22051    pub flow_rate_y: f32,
22052}
22053impl OPTICAL_FLOW_DATA {
22054    pub const ENCODED_LEN: usize = 34usize;
22055    pub const DEFAULT: Self = Self {
22056        time_usec: 0_u64,
22057        flow_comp_m_x: 0.0_f32,
22058        flow_comp_m_y: 0.0_f32,
22059        ground_distance: 0.0_f32,
22060        flow_x: 0_i16,
22061        flow_y: 0_i16,
22062        sensor_id: 0_u8,
22063        quality: 0_u8,
22064        flow_rate_x: 0.0_f32,
22065        flow_rate_y: 0.0_f32,
22066    };
22067    #[cfg(feature = "arbitrary")]
22068    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22069        use arbitrary::{Arbitrary, Unstructured};
22070        let mut buf = [0u8; 1024];
22071        rng.fill_bytes(&mut buf);
22072        let mut unstructured = Unstructured::new(&buf);
22073        Self::arbitrary(&mut unstructured).unwrap_or_default()
22074    }
22075}
22076impl Default for OPTICAL_FLOW_DATA {
22077    fn default() -> Self {
22078        Self::DEFAULT.clone()
22079    }
22080}
22081impl MessageData for OPTICAL_FLOW_DATA {
22082    type Message = MavMessage;
22083    const ID: u32 = 100u32;
22084    const NAME: &'static str = "OPTICAL_FLOW";
22085    const EXTRA_CRC: u8 = 175u8;
22086    const ENCODED_LEN: usize = 34usize;
22087    fn deser(
22088        _version: MavlinkVersion,
22089        __input: &[u8],
22090    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22091        let avail_len = __input.len();
22092        let mut payload_buf = [0; Self::ENCODED_LEN];
22093        let mut buf = if avail_len < Self::ENCODED_LEN {
22094            payload_buf[0..avail_len].copy_from_slice(__input);
22095            Bytes::new(&payload_buf)
22096        } else {
22097            Bytes::new(__input)
22098        };
22099        let mut __struct = Self::default();
22100        __struct.time_usec = buf.get_u64_le();
22101        __struct.flow_comp_m_x = buf.get_f32_le();
22102        __struct.flow_comp_m_y = buf.get_f32_le();
22103        __struct.ground_distance = buf.get_f32_le();
22104        __struct.flow_x = buf.get_i16_le();
22105        __struct.flow_y = buf.get_i16_le();
22106        __struct.sensor_id = buf.get_u8();
22107        __struct.quality = buf.get_u8();
22108        __struct.flow_rate_x = buf.get_f32_le();
22109        __struct.flow_rate_y = buf.get_f32_le();
22110        Ok(__struct)
22111    }
22112    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22113        let mut __tmp = BytesMut::new(bytes);
22114        #[allow(clippy::absurd_extreme_comparisons)]
22115        #[allow(unused_comparisons)]
22116        if __tmp.remaining() < Self::ENCODED_LEN {
22117            panic!(
22118                "buffer is too small (need {} bytes, but got {})",
22119                Self::ENCODED_LEN,
22120                __tmp.remaining(),
22121            )
22122        }
22123        __tmp.put_u64_le(self.time_usec);
22124        __tmp.put_f32_le(self.flow_comp_m_x);
22125        __tmp.put_f32_le(self.flow_comp_m_y);
22126        __tmp.put_f32_le(self.ground_distance);
22127        __tmp.put_i16_le(self.flow_x);
22128        __tmp.put_i16_le(self.flow_y);
22129        __tmp.put_u8(self.sensor_id);
22130        __tmp.put_u8(self.quality);
22131        __tmp.put_f32_le(self.flow_rate_x);
22132        __tmp.put_f32_le(self.flow_rate_y);
22133        if matches!(version, MavlinkVersion::V2) {
22134            let len = __tmp.len();
22135            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22136        } else {
22137            __tmp.len()
22138        }
22139    }
22140}
22141#[doc = "id: 106"]
22142#[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
22143#[derive(Debug, Clone, PartialEq)]
22144#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22145#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22146pub struct OPTICAL_FLOW_RAD_DATA {
22147    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22148    pub time_usec: u64,
22149    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
22150    pub integration_time_us: u32,
22151    #[doc = "Flow around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
22152    pub integrated_x: f32,
22153    #[doc = "Flow around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
22154    pub integrated_y: f32,
22155    #[doc = "RH rotation around X axis"]
22156    pub integrated_xgyro: f32,
22157    #[doc = "RH rotation around Y axis"]
22158    pub integrated_ygyro: f32,
22159    #[doc = "RH rotation around Z axis"]
22160    pub integrated_zgyro: f32,
22161    #[doc = "Time since the distance was sampled."]
22162    pub time_delta_distance_us: u32,
22163    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
22164    pub distance: f32,
22165    #[doc = "Temperature"]
22166    pub temperature: i16,
22167    #[doc = "Sensor ID"]
22168    pub sensor_id: u8,
22169    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
22170    pub quality: u8,
22171}
22172impl OPTICAL_FLOW_RAD_DATA {
22173    pub const ENCODED_LEN: usize = 44usize;
22174    pub const DEFAULT: Self = Self {
22175        time_usec: 0_u64,
22176        integration_time_us: 0_u32,
22177        integrated_x: 0.0_f32,
22178        integrated_y: 0.0_f32,
22179        integrated_xgyro: 0.0_f32,
22180        integrated_ygyro: 0.0_f32,
22181        integrated_zgyro: 0.0_f32,
22182        time_delta_distance_us: 0_u32,
22183        distance: 0.0_f32,
22184        temperature: 0_i16,
22185        sensor_id: 0_u8,
22186        quality: 0_u8,
22187    };
22188    #[cfg(feature = "arbitrary")]
22189    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22190        use arbitrary::{Arbitrary, Unstructured};
22191        let mut buf = [0u8; 1024];
22192        rng.fill_bytes(&mut buf);
22193        let mut unstructured = Unstructured::new(&buf);
22194        Self::arbitrary(&mut unstructured).unwrap_or_default()
22195    }
22196}
22197impl Default for OPTICAL_FLOW_RAD_DATA {
22198    fn default() -> Self {
22199        Self::DEFAULT.clone()
22200    }
22201}
22202impl MessageData for OPTICAL_FLOW_RAD_DATA {
22203    type Message = MavMessage;
22204    const ID: u32 = 106u32;
22205    const NAME: &'static str = "OPTICAL_FLOW_RAD";
22206    const EXTRA_CRC: u8 = 138u8;
22207    const ENCODED_LEN: usize = 44usize;
22208    fn deser(
22209        _version: MavlinkVersion,
22210        __input: &[u8],
22211    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22212        let avail_len = __input.len();
22213        let mut payload_buf = [0; Self::ENCODED_LEN];
22214        let mut buf = if avail_len < Self::ENCODED_LEN {
22215            payload_buf[0..avail_len].copy_from_slice(__input);
22216            Bytes::new(&payload_buf)
22217        } else {
22218            Bytes::new(__input)
22219        };
22220        let mut __struct = Self::default();
22221        __struct.time_usec = buf.get_u64_le();
22222        __struct.integration_time_us = buf.get_u32_le();
22223        __struct.integrated_x = buf.get_f32_le();
22224        __struct.integrated_y = buf.get_f32_le();
22225        __struct.integrated_xgyro = buf.get_f32_le();
22226        __struct.integrated_ygyro = buf.get_f32_le();
22227        __struct.integrated_zgyro = buf.get_f32_le();
22228        __struct.time_delta_distance_us = buf.get_u32_le();
22229        __struct.distance = buf.get_f32_le();
22230        __struct.temperature = buf.get_i16_le();
22231        __struct.sensor_id = buf.get_u8();
22232        __struct.quality = buf.get_u8();
22233        Ok(__struct)
22234    }
22235    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22236        let mut __tmp = BytesMut::new(bytes);
22237        #[allow(clippy::absurd_extreme_comparisons)]
22238        #[allow(unused_comparisons)]
22239        if __tmp.remaining() < Self::ENCODED_LEN {
22240            panic!(
22241                "buffer is too small (need {} bytes, but got {})",
22242                Self::ENCODED_LEN,
22243                __tmp.remaining(),
22244            )
22245        }
22246        __tmp.put_u64_le(self.time_usec);
22247        __tmp.put_u32_le(self.integration_time_us);
22248        __tmp.put_f32_le(self.integrated_x);
22249        __tmp.put_f32_le(self.integrated_y);
22250        __tmp.put_f32_le(self.integrated_xgyro);
22251        __tmp.put_f32_le(self.integrated_ygyro);
22252        __tmp.put_f32_le(self.integrated_zgyro);
22253        __tmp.put_u32_le(self.time_delta_distance_us);
22254        __tmp.put_f32_le(self.distance);
22255        __tmp.put_i16_le(self.temperature);
22256        __tmp.put_u8(self.sensor_id);
22257        __tmp.put_u8(self.quality);
22258        if matches!(version, MavlinkVersion::V2) {
22259            let len = __tmp.len();
22260            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22261        } else {
22262            __tmp.len()
22263        }
22264    }
22265}
22266#[doc = "id: 360"]
22267#[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
22268#[derive(Debug, Clone, PartialEq)]
22269#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22270#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22271pub struct ORBIT_EXECUTION_STATUS_DATA {
22272    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22273    pub time_usec: u64,
22274    #[doc = "Radius of the orbit circle. Positive values orbit clockwise, negative values orbit counter-clockwise."]
22275    pub radius: f32,
22276    #[doc = "X coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
22277    pub x: i32,
22278    #[doc = "Y coordinate of center point.  Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
22279    pub y: i32,
22280    #[doc = "Altitude of center point. Coordinate system depends on frame field."]
22281    pub z: f32,
22282    #[doc = "The coordinate system of the fields: x, y, z."]
22283    pub frame: MavFrame,
22284}
22285impl ORBIT_EXECUTION_STATUS_DATA {
22286    pub const ENCODED_LEN: usize = 25usize;
22287    pub const DEFAULT: Self = Self {
22288        time_usec: 0_u64,
22289        radius: 0.0_f32,
22290        x: 0_i32,
22291        y: 0_i32,
22292        z: 0.0_f32,
22293        frame: MavFrame::DEFAULT,
22294    };
22295    #[cfg(feature = "arbitrary")]
22296    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22297        use arbitrary::{Arbitrary, Unstructured};
22298        let mut buf = [0u8; 1024];
22299        rng.fill_bytes(&mut buf);
22300        let mut unstructured = Unstructured::new(&buf);
22301        Self::arbitrary(&mut unstructured).unwrap_or_default()
22302    }
22303}
22304impl Default for ORBIT_EXECUTION_STATUS_DATA {
22305    fn default() -> Self {
22306        Self::DEFAULT.clone()
22307    }
22308}
22309impl MessageData for ORBIT_EXECUTION_STATUS_DATA {
22310    type Message = MavMessage;
22311    const ID: u32 = 360u32;
22312    const NAME: &'static str = "ORBIT_EXECUTION_STATUS";
22313    const EXTRA_CRC: u8 = 11u8;
22314    const ENCODED_LEN: usize = 25usize;
22315    fn deser(
22316        _version: MavlinkVersion,
22317        __input: &[u8],
22318    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22319        let avail_len = __input.len();
22320        let mut payload_buf = [0; Self::ENCODED_LEN];
22321        let mut buf = if avail_len < Self::ENCODED_LEN {
22322            payload_buf[0..avail_len].copy_from_slice(__input);
22323            Bytes::new(&payload_buf)
22324        } else {
22325            Bytes::new(__input)
22326        };
22327        let mut __struct = Self::default();
22328        __struct.time_usec = buf.get_u64_le();
22329        __struct.radius = buf.get_f32_le();
22330        __struct.x = buf.get_i32_le();
22331        __struct.y = buf.get_i32_le();
22332        __struct.z = buf.get_f32_le();
22333        let tmp = buf.get_u8();
22334        __struct.frame =
22335            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22336                enum_type: "MavFrame",
22337                value: tmp as u32,
22338            })?;
22339        Ok(__struct)
22340    }
22341    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22342        let mut __tmp = BytesMut::new(bytes);
22343        #[allow(clippy::absurd_extreme_comparisons)]
22344        #[allow(unused_comparisons)]
22345        if __tmp.remaining() < Self::ENCODED_LEN {
22346            panic!(
22347                "buffer is too small (need {} bytes, but got {})",
22348                Self::ENCODED_LEN,
22349                __tmp.remaining(),
22350            )
22351        }
22352        __tmp.put_u64_le(self.time_usec);
22353        __tmp.put_f32_le(self.radius);
22354        __tmp.put_i32_le(self.x);
22355        __tmp.put_i32_le(self.y);
22356        __tmp.put_f32_le(self.z);
22357        __tmp.put_u8(self.frame as u8);
22358        if matches!(version, MavlinkVersion::V2) {
22359            let len = __tmp.len();
22360            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22361        } else {
22362            __tmp.len()
22363        }
22364    }
22365}
22366#[doc = "id: 324"]
22367#[doc = "Response from a PARAM_EXT_SET message."]
22368#[derive(Debug, Clone, PartialEq)]
22369#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22370#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22371pub struct PARAM_EXT_ACK_DATA {
22372    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
22373    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22374    pub param_id: [u8; 16],
22375    #[doc = "Parameter value (new value if PARAM_ACK_ACCEPTED, current value otherwise)"]
22376    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22377    pub param_value: [u8; 128],
22378    #[doc = "Parameter type."]
22379    pub param_type: MavParamExtType,
22380    #[doc = "Result code."]
22381    pub param_result: ParamAck,
22382}
22383impl PARAM_EXT_ACK_DATA {
22384    pub const ENCODED_LEN: usize = 146usize;
22385    pub const DEFAULT: Self = Self {
22386        param_id: [0_u8; 16usize],
22387        param_value: [0_u8; 128usize],
22388        param_type: MavParamExtType::DEFAULT,
22389        param_result: ParamAck::DEFAULT,
22390    };
22391    #[cfg(feature = "arbitrary")]
22392    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22393        use arbitrary::{Arbitrary, Unstructured};
22394        let mut buf = [0u8; 1024];
22395        rng.fill_bytes(&mut buf);
22396        let mut unstructured = Unstructured::new(&buf);
22397        Self::arbitrary(&mut unstructured).unwrap_or_default()
22398    }
22399}
22400impl Default for PARAM_EXT_ACK_DATA {
22401    fn default() -> Self {
22402        Self::DEFAULT.clone()
22403    }
22404}
22405impl MessageData for PARAM_EXT_ACK_DATA {
22406    type Message = MavMessage;
22407    const ID: u32 = 324u32;
22408    const NAME: &'static str = "PARAM_EXT_ACK";
22409    const EXTRA_CRC: u8 = 132u8;
22410    const ENCODED_LEN: usize = 146usize;
22411    fn deser(
22412        _version: MavlinkVersion,
22413        __input: &[u8],
22414    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22415        let avail_len = __input.len();
22416        let mut payload_buf = [0; Self::ENCODED_LEN];
22417        let mut buf = if avail_len < Self::ENCODED_LEN {
22418            payload_buf[0..avail_len].copy_from_slice(__input);
22419            Bytes::new(&payload_buf)
22420        } else {
22421            Bytes::new(__input)
22422        };
22423        let mut __struct = Self::default();
22424        for v in &mut __struct.param_id {
22425            let val = buf.get_u8();
22426            *v = val;
22427        }
22428        for v in &mut __struct.param_value {
22429            let val = buf.get_u8();
22430            *v = val;
22431        }
22432        let tmp = buf.get_u8();
22433        __struct.param_type =
22434            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22435                enum_type: "MavParamExtType",
22436                value: tmp as u32,
22437            })?;
22438        let tmp = buf.get_u8();
22439        __struct.param_result =
22440            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22441                enum_type: "ParamAck",
22442                value: tmp as u32,
22443            })?;
22444        Ok(__struct)
22445    }
22446    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22447        let mut __tmp = BytesMut::new(bytes);
22448        #[allow(clippy::absurd_extreme_comparisons)]
22449        #[allow(unused_comparisons)]
22450        if __tmp.remaining() < Self::ENCODED_LEN {
22451            panic!(
22452                "buffer is too small (need {} bytes, but got {})",
22453                Self::ENCODED_LEN,
22454                __tmp.remaining(),
22455            )
22456        }
22457        for val in &self.param_id {
22458            __tmp.put_u8(*val);
22459        }
22460        for val in &self.param_value {
22461            __tmp.put_u8(*val);
22462        }
22463        __tmp.put_u8(self.param_type as u8);
22464        __tmp.put_u8(self.param_result as u8);
22465        if matches!(version, MavlinkVersion::V2) {
22466            let len = __tmp.len();
22467            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22468        } else {
22469            __tmp.len()
22470        }
22471    }
22472}
22473#[doc = "id: 321"]
22474#[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
22475#[derive(Debug, Clone, PartialEq)]
22476#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22477#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22478pub struct PARAM_EXT_REQUEST_LIST_DATA {
22479    #[doc = "System ID"]
22480    pub target_system: u8,
22481    #[doc = "Component ID"]
22482    pub target_component: u8,
22483}
22484impl PARAM_EXT_REQUEST_LIST_DATA {
22485    pub const ENCODED_LEN: usize = 2usize;
22486    pub const DEFAULT: Self = Self {
22487        target_system: 0_u8,
22488        target_component: 0_u8,
22489    };
22490    #[cfg(feature = "arbitrary")]
22491    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22492        use arbitrary::{Arbitrary, Unstructured};
22493        let mut buf = [0u8; 1024];
22494        rng.fill_bytes(&mut buf);
22495        let mut unstructured = Unstructured::new(&buf);
22496        Self::arbitrary(&mut unstructured).unwrap_or_default()
22497    }
22498}
22499impl Default for PARAM_EXT_REQUEST_LIST_DATA {
22500    fn default() -> Self {
22501        Self::DEFAULT.clone()
22502    }
22503}
22504impl MessageData for PARAM_EXT_REQUEST_LIST_DATA {
22505    type Message = MavMessage;
22506    const ID: u32 = 321u32;
22507    const NAME: &'static str = "PARAM_EXT_REQUEST_LIST";
22508    const EXTRA_CRC: u8 = 88u8;
22509    const ENCODED_LEN: usize = 2usize;
22510    fn deser(
22511        _version: MavlinkVersion,
22512        __input: &[u8],
22513    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22514        let avail_len = __input.len();
22515        let mut payload_buf = [0; Self::ENCODED_LEN];
22516        let mut buf = if avail_len < Self::ENCODED_LEN {
22517            payload_buf[0..avail_len].copy_from_slice(__input);
22518            Bytes::new(&payload_buf)
22519        } else {
22520            Bytes::new(__input)
22521        };
22522        let mut __struct = Self::default();
22523        __struct.target_system = buf.get_u8();
22524        __struct.target_component = buf.get_u8();
22525        Ok(__struct)
22526    }
22527    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22528        let mut __tmp = BytesMut::new(bytes);
22529        #[allow(clippy::absurd_extreme_comparisons)]
22530        #[allow(unused_comparisons)]
22531        if __tmp.remaining() < Self::ENCODED_LEN {
22532            panic!(
22533                "buffer is too small (need {} bytes, but got {})",
22534                Self::ENCODED_LEN,
22535                __tmp.remaining(),
22536            )
22537        }
22538        __tmp.put_u8(self.target_system);
22539        __tmp.put_u8(self.target_component);
22540        if matches!(version, MavlinkVersion::V2) {
22541            let len = __tmp.len();
22542            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22543        } else {
22544            __tmp.len()
22545        }
22546    }
22547}
22548#[doc = "id: 320"]
22549#[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
22550#[derive(Debug, Clone, PartialEq)]
22551#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22552#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22553pub struct PARAM_EXT_REQUEST_READ_DATA {
22554    #[doc = "Parameter index. Set to -1 to use the Parameter ID field as identifier (else param_id will be ignored)"]
22555    pub param_index: i16,
22556    #[doc = "System ID"]
22557    pub target_system: u8,
22558    #[doc = "Component ID"]
22559    pub target_component: u8,
22560    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
22561    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22562    pub param_id: [u8; 16],
22563}
22564impl PARAM_EXT_REQUEST_READ_DATA {
22565    pub const ENCODED_LEN: usize = 20usize;
22566    pub const DEFAULT: Self = Self {
22567        param_index: 0_i16,
22568        target_system: 0_u8,
22569        target_component: 0_u8,
22570        param_id: [0_u8; 16usize],
22571    };
22572    #[cfg(feature = "arbitrary")]
22573    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22574        use arbitrary::{Arbitrary, Unstructured};
22575        let mut buf = [0u8; 1024];
22576        rng.fill_bytes(&mut buf);
22577        let mut unstructured = Unstructured::new(&buf);
22578        Self::arbitrary(&mut unstructured).unwrap_or_default()
22579    }
22580}
22581impl Default for PARAM_EXT_REQUEST_READ_DATA {
22582    fn default() -> Self {
22583        Self::DEFAULT.clone()
22584    }
22585}
22586impl MessageData for PARAM_EXT_REQUEST_READ_DATA {
22587    type Message = MavMessage;
22588    const ID: u32 = 320u32;
22589    const NAME: &'static str = "PARAM_EXT_REQUEST_READ";
22590    const EXTRA_CRC: u8 = 243u8;
22591    const ENCODED_LEN: usize = 20usize;
22592    fn deser(
22593        _version: MavlinkVersion,
22594        __input: &[u8],
22595    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22596        let avail_len = __input.len();
22597        let mut payload_buf = [0; Self::ENCODED_LEN];
22598        let mut buf = if avail_len < Self::ENCODED_LEN {
22599            payload_buf[0..avail_len].copy_from_slice(__input);
22600            Bytes::new(&payload_buf)
22601        } else {
22602            Bytes::new(__input)
22603        };
22604        let mut __struct = Self::default();
22605        __struct.param_index = buf.get_i16_le();
22606        __struct.target_system = buf.get_u8();
22607        __struct.target_component = buf.get_u8();
22608        for v in &mut __struct.param_id {
22609            let val = buf.get_u8();
22610            *v = val;
22611        }
22612        Ok(__struct)
22613    }
22614    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22615        let mut __tmp = BytesMut::new(bytes);
22616        #[allow(clippy::absurd_extreme_comparisons)]
22617        #[allow(unused_comparisons)]
22618        if __tmp.remaining() < Self::ENCODED_LEN {
22619            panic!(
22620                "buffer is too small (need {} bytes, but got {})",
22621                Self::ENCODED_LEN,
22622                __tmp.remaining(),
22623            )
22624        }
22625        __tmp.put_i16_le(self.param_index);
22626        __tmp.put_u8(self.target_system);
22627        __tmp.put_u8(self.target_component);
22628        for val in &self.param_id {
22629            __tmp.put_u8(*val);
22630        }
22631        if matches!(version, MavlinkVersion::V2) {
22632            let len = __tmp.len();
22633            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22634        } else {
22635            __tmp.len()
22636        }
22637    }
22638}
22639#[doc = "id: 323"]
22640#[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
22641#[derive(Debug, Clone, PartialEq)]
22642#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22643#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22644pub struct PARAM_EXT_SET_DATA {
22645    #[doc = "System ID"]
22646    pub target_system: u8,
22647    #[doc = "Component ID"]
22648    pub target_component: u8,
22649    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
22650    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22651    pub param_id: [u8; 16],
22652    #[doc = "Parameter value"]
22653    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22654    pub param_value: [u8; 128],
22655    #[doc = "Parameter type."]
22656    pub param_type: MavParamExtType,
22657}
22658impl PARAM_EXT_SET_DATA {
22659    pub const ENCODED_LEN: usize = 147usize;
22660    pub const DEFAULT: Self = Self {
22661        target_system: 0_u8,
22662        target_component: 0_u8,
22663        param_id: [0_u8; 16usize],
22664        param_value: [0_u8; 128usize],
22665        param_type: MavParamExtType::DEFAULT,
22666    };
22667    #[cfg(feature = "arbitrary")]
22668    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22669        use arbitrary::{Arbitrary, Unstructured};
22670        let mut buf = [0u8; 1024];
22671        rng.fill_bytes(&mut buf);
22672        let mut unstructured = Unstructured::new(&buf);
22673        Self::arbitrary(&mut unstructured).unwrap_or_default()
22674    }
22675}
22676impl Default for PARAM_EXT_SET_DATA {
22677    fn default() -> Self {
22678        Self::DEFAULT.clone()
22679    }
22680}
22681impl MessageData for PARAM_EXT_SET_DATA {
22682    type Message = MavMessage;
22683    const ID: u32 = 323u32;
22684    const NAME: &'static str = "PARAM_EXT_SET";
22685    const EXTRA_CRC: u8 = 78u8;
22686    const ENCODED_LEN: usize = 147usize;
22687    fn deser(
22688        _version: MavlinkVersion,
22689        __input: &[u8],
22690    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22691        let avail_len = __input.len();
22692        let mut payload_buf = [0; Self::ENCODED_LEN];
22693        let mut buf = if avail_len < Self::ENCODED_LEN {
22694            payload_buf[0..avail_len].copy_from_slice(__input);
22695            Bytes::new(&payload_buf)
22696        } else {
22697            Bytes::new(__input)
22698        };
22699        let mut __struct = Self::default();
22700        __struct.target_system = buf.get_u8();
22701        __struct.target_component = buf.get_u8();
22702        for v in &mut __struct.param_id {
22703            let val = buf.get_u8();
22704            *v = val;
22705        }
22706        for v in &mut __struct.param_value {
22707            let val = buf.get_u8();
22708            *v = val;
22709        }
22710        let tmp = buf.get_u8();
22711        __struct.param_type =
22712            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22713                enum_type: "MavParamExtType",
22714                value: tmp as u32,
22715            })?;
22716        Ok(__struct)
22717    }
22718    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22719        let mut __tmp = BytesMut::new(bytes);
22720        #[allow(clippy::absurd_extreme_comparisons)]
22721        #[allow(unused_comparisons)]
22722        if __tmp.remaining() < Self::ENCODED_LEN {
22723            panic!(
22724                "buffer is too small (need {} bytes, but got {})",
22725                Self::ENCODED_LEN,
22726                __tmp.remaining(),
22727            )
22728        }
22729        __tmp.put_u8(self.target_system);
22730        __tmp.put_u8(self.target_component);
22731        for val in &self.param_id {
22732            __tmp.put_u8(*val);
22733        }
22734        for val in &self.param_value {
22735            __tmp.put_u8(*val);
22736        }
22737        __tmp.put_u8(self.param_type as u8);
22738        if matches!(version, MavlinkVersion::V2) {
22739            let len = __tmp.len();
22740            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22741        } else {
22742            __tmp.len()
22743        }
22744    }
22745}
22746#[doc = "id: 322"]
22747#[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
22748#[derive(Debug, Clone, PartialEq)]
22749#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22750#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22751pub struct PARAM_EXT_VALUE_DATA {
22752    #[doc = "Total number of parameters"]
22753    pub param_count: u16,
22754    #[doc = "Index of this parameter"]
22755    pub param_index: u16,
22756    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
22757    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22758    pub param_id: [u8; 16],
22759    #[doc = "Parameter value"]
22760    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22761    pub param_value: [u8; 128],
22762    #[doc = "Parameter type."]
22763    pub param_type: MavParamExtType,
22764}
22765impl PARAM_EXT_VALUE_DATA {
22766    pub const ENCODED_LEN: usize = 149usize;
22767    pub const DEFAULT: Self = Self {
22768        param_count: 0_u16,
22769        param_index: 0_u16,
22770        param_id: [0_u8; 16usize],
22771        param_value: [0_u8; 128usize],
22772        param_type: MavParamExtType::DEFAULT,
22773    };
22774    #[cfg(feature = "arbitrary")]
22775    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22776        use arbitrary::{Arbitrary, Unstructured};
22777        let mut buf = [0u8; 1024];
22778        rng.fill_bytes(&mut buf);
22779        let mut unstructured = Unstructured::new(&buf);
22780        Self::arbitrary(&mut unstructured).unwrap_or_default()
22781    }
22782}
22783impl Default for PARAM_EXT_VALUE_DATA {
22784    fn default() -> Self {
22785        Self::DEFAULT.clone()
22786    }
22787}
22788impl MessageData for PARAM_EXT_VALUE_DATA {
22789    type Message = MavMessage;
22790    const ID: u32 = 322u32;
22791    const NAME: &'static str = "PARAM_EXT_VALUE";
22792    const EXTRA_CRC: u8 = 243u8;
22793    const ENCODED_LEN: usize = 149usize;
22794    fn deser(
22795        _version: MavlinkVersion,
22796        __input: &[u8],
22797    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22798        let avail_len = __input.len();
22799        let mut payload_buf = [0; Self::ENCODED_LEN];
22800        let mut buf = if avail_len < Self::ENCODED_LEN {
22801            payload_buf[0..avail_len].copy_from_slice(__input);
22802            Bytes::new(&payload_buf)
22803        } else {
22804            Bytes::new(__input)
22805        };
22806        let mut __struct = Self::default();
22807        __struct.param_count = buf.get_u16_le();
22808        __struct.param_index = buf.get_u16_le();
22809        for v in &mut __struct.param_id {
22810            let val = buf.get_u8();
22811            *v = val;
22812        }
22813        for v in &mut __struct.param_value {
22814            let val = buf.get_u8();
22815            *v = val;
22816        }
22817        let tmp = buf.get_u8();
22818        __struct.param_type =
22819            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22820                enum_type: "MavParamExtType",
22821                value: tmp as u32,
22822            })?;
22823        Ok(__struct)
22824    }
22825    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22826        let mut __tmp = BytesMut::new(bytes);
22827        #[allow(clippy::absurd_extreme_comparisons)]
22828        #[allow(unused_comparisons)]
22829        if __tmp.remaining() < Self::ENCODED_LEN {
22830            panic!(
22831                "buffer is too small (need {} bytes, but got {})",
22832                Self::ENCODED_LEN,
22833                __tmp.remaining(),
22834            )
22835        }
22836        __tmp.put_u16_le(self.param_count);
22837        __tmp.put_u16_le(self.param_index);
22838        for val in &self.param_id {
22839            __tmp.put_u8(*val);
22840        }
22841        for val in &self.param_value {
22842            __tmp.put_u8(*val);
22843        }
22844        __tmp.put_u8(self.param_type as u8);
22845        if matches!(version, MavlinkVersion::V2) {
22846            let len = __tmp.len();
22847            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22848        } else {
22849            __tmp.len()
22850        }
22851    }
22852}
22853#[doc = "id: 50"]
22854#[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
22855#[derive(Debug, Clone, PartialEq)]
22856#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22857#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22858pub struct PARAM_MAP_RC_DATA {
22859    #[doc = "Initial parameter value"]
22860    pub param_value0: f32,
22861    #[doc = "Scale, maps the RC range [-1, 1] to a parameter value"]
22862    pub scale: f32,
22863    #[doc = "Minimum param value. The protocol does not define if this overwrites an onboard minimum value. (Depends on implementation)"]
22864    pub param_value_min: f32,
22865    #[doc = "Maximum param value. The protocol does not define if this overwrites an onboard maximum value. (Depends on implementation)"]
22866    pub param_value_max: f32,
22867    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored), send -2 to disable any existing map for this rc_channel_index."]
22868    pub param_index: i16,
22869    #[doc = "System ID"]
22870    pub target_system: u8,
22871    #[doc = "Component ID"]
22872    pub target_component: u8,
22873    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
22874    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22875    pub param_id: [u8; 16],
22876    #[doc = "Index of parameter RC channel. Not equal to the RC channel id. Typically corresponds to a potentiometer-knob on the RC."]
22877    pub parameter_rc_channel_index: u8,
22878}
22879impl PARAM_MAP_RC_DATA {
22880    pub const ENCODED_LEN: usize = 37usize;
22881    pub const DEFAULT: Self = Self {
22882        param_value0: 0.0_f32,
22883        scale: 0.0_f32,
22884        param_value_min: 0.0_f32,
22885        param_value_max: 0.0_f32,
22886        param_index: 0_i16,
22887        target_system: 0_u8,
22888        target_component: 0_u8,
22889        param_id: [0_u8; 16usize],
22890        parameter_rc_channel_index: 0_u8,
22891    };
22892    #[cfg(feature = "arbitrary")]
22893    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22894        use arbitrary::{Arbitrary, Unstructured};
22895        let mut buf = [0u8; 1024];
22896        rng.fill_bytes(&mut buf);
22897        let mut unstructured = Unstructured::new(&buf);
22898        Self::arbitrary(&mut unstructured).unwrap_or_default()
22899    }
22900}
22901impl Default for PARAM_MAP_RC_DATA {
22902    fn default() -> Self {
22903        Self::DEFAULT.clone()
22904    }
22905}
22906impl MessageData for PARAM_MAP_RC_DATA {
22907    type Message = MavMessage;
22908    const ID: u32 = 50u32;
22909    const NAME: &'static str = "PARAM_MAP_RC";
22910    const EXTRA_CRC: u8 = 78u8;
22911    const ENCODED_LEN: usize = 37usize;
22912    fn deser(
22913        _version: MavlinkVersion,
22914        __input: &[u8],
22915    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22916        let avail_len = __input.len();
22917        let mut payload_buf = [0; Self::ENCODED_LEN];
22918        let mut buf = if avail_len < Self::ENCODED_LEN {
22919            payload_buf[0..avail_len].copy_from_slice(__input);
22920            Bytes::new(&payload_buf)
22921        } else {
22922            Bytes::new(__input)
22923        };
22924        let mut __struct = Self::default();
22925        __struct.param_value0 = buf.get_f32_le();
22926        __struct.scale = buf.get_f32_le();
22927        __struct.param_value_min = buf.get_f32_le();
22928        __struct.param_value_max = buf.get_f32_le();
22929        __struct.param_index = buf.get_i16_le();
22930        __struct.target_system = buf.get_u8();
22931        __struct.target_component = buf.get_u8();
22932        for v in &mut __struct.param_id {
22933            let val = buf.get_u8();
22934            *v = val;
22935        }
22936        __struct.parameter_rc_channel_index = buf.get_u8();
22937        Ok(__struct)
22938    }
22939    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22940        let mut __tmp = BytesMut::new(bytes);
22941        #[allow(clippy::absurd_extreme_comparisons)]
22942        #[allow(unused_comparisons)]
22943        if __tmp.remaining() < Self::ENCODED_LEN {
22944            panic!(
22945                "buffer is too small (need {} bytes, but got {})",
22946                Self::ENCODED_LEN,
22947                __tmp.remaining(),
22948            )
22949        }
22950        __tmp.put_f32_le(self.param_value0);
22951        __tmp.put_f32_le(self.scale);
22952        __tmp.put_f32_le(self.param_value_min);
22953        __tmp.put_f32_le(self.param_value_max);
22954        __tmp.put_i16_le(self.param_index);
22955        __tmp.put_u8(self.target_system);
22956        __tmp.put_u8(self.target_component);
22957        for val in &self.param_id {
22958            __tmp.put_u8(*val);
22959        }
22960        __tmp.put_u8(self.parameter_rc_channel_index);
22961        if matches!(version, MavlinkVersion::V2) {
22962            let len = __tmp.len();
22963            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22964        } else {
22965            __tmp.len()
22966        }
22967    }
22968}
22969#[doc = "id: 21"]
22970#[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
22971#[derive(Debug, Clone, PartialEq)]
22972#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22973#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22974pub struct PARAM_REQUEST_LIST_DATA {
22975    #[doc = "System ID"]
22976    pub target_system: u8,
22977    #[doc = "Component ID"]
22978    pub target_component: u8,
22979}
22980impl PARAM_REQUEST_LIST_DATA {
22981    pub const ENCODED_LEN: usize = 2usize;
22982    pub const DEFAULT: Self = Self {
22983        target_system: 0_u8,
22984        target_component: 0_u8,
22985    };
22986    #[cfg(feature = "arbitrary")]
22987    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22988        use arbitrary::{Arbitrary, Unstructured};
22989        let mut buf = [0u8; 1024];
22990        rng.fill_bytes(&mut buf);
22991        let mut unstructured = Unstructured::new(&buf);
22992        Self::arbitrary(&mut unstructured).unwrap_or_default()
22993    }
22994}
22995impl Default for PARAM_REQUEST_LIST_DATA {
22996    fn default() -> Self {
22997        Self::DEFAULT.clone()
22998    }
22999}
23000impl MessageData for PARAM_REQUEST_LIST_DATA {
23001    type Message = MavMessage;
23002    const ID: u32 = 21u32;
23003    const NAME: &'static str = "PARAM_REQUEST_LIST";
23004    const EXTRA_CRC: u8 = 159u8;
23005    const ENCODED_LEN: usize = 2usize;
23006    fn deser(
23007        _version: MavlinkVersion,
23008        __input: &[u8],
23009    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23010        let avail_len = __input.len();
23011        let mut payload_buf = [0; Self::ENCODED_LEN];
23012        let mut buf = if avail_len < Self::ENCODED_LEN {
23013            payload_buf[0..avail_len].copy_from_slice(__input);
23014            Bytes::new(&payload_buf)
23015        } else {
23016            Bytes::new(__input)
23017        };
23018        let mut __struct = Self::default();
23019        __struct.target_system = buf.get_u8();
23020        __struct.target_component = buf.get_u8();
23021        Ok(__struct)
23022    }
23023    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23024        let mut __tmp = BytesMut::new(bytes);
23025        #[allow(clippy::absurd_extreme_comparisons)]
23026        #[allow(unused_comparisons)]
23027        if __tmp.remaining() < Self::ENCODED_LEN {
23028            panic!(
23029                "buffer is too small (need {} bytes, but got {})",
23030                Self::ENCODED_LEN,
23031                __tmp.remaining(),
23032            )
23033        }
23034        __tmp.put_u8(self.target_system);
23035        __tmp.put_u8(self.target_component);
23036        if matches!(version, MavlinkVersion::V2) {
23037            let len = __tmp.len();
23038            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23039        } else {
23040            __tmp.len()
23041        }
23042    }
23043}
23044#[doc = "id: 20"]
23045#[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
23046#[derive(Debug, Clone, PartialEq)]
23047#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23048#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23049pub struct PARAM_REQUEST_READ_DATA {
23050    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored)"]
23051    pub param_index: i16,
23052    #[doc = "System ID"]
23053    pub target_system: u8,
23054    #[doc = "Component ID"]
23055    pub target_component: u8,
23056    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23057    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23058    pub param_id: [u8; 16],
23059}
23060impl PARAM_REQUEST_READ_DATA {
23061    pub const ENCODED_LEN: usize = 20usize;
23062    pub const DEFAULT: Self = Self {
23063        param_index: 0_i16,
23064        target_system: 0_u8,
23065        target_component: 0_u8,
23066        param_id: [0_u8; 16usize],
23067    };
23068    #[cfg(feature = "arbitrary")]
23069    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23070        use arbitrary::{Arbitrary, Unstructured};
23071        let mut buf = [0u8; 1024];
23072        rng.fill_bytes(&mut buf);
23073        let mut unstructured = Unstructured::new(&buf);
23074        Self::arbitrary(&mut unstructured).unwrap_or_default()
23075    }
23076}
23077impl Default for PARAM_REQUEST_READ_DATA {
23078    fn default() -> Self {
23079        Self::DEFAULT.clone()
23080    }
23081}
23082impl MessageData for PARAM_REQUEST_READ_DATA {
23083    type Message = MavMessage;
23084    const ID: u32 = 20u32;
23085    const NAME: &'static str = "PARAM_REQUEST_READ";
23086    const EXTRA_CRC: u8 = 214u8;
23087    const ENCODED_LEN: usize = 20usize;
23088    fn deser(
23089        _version: MavlinkVersion,
23090        __input: &[u8],
23091    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23092        let avail_len = __input.len();
23093        let mut payload_buf = [0; Self::ENCODED_LEN];
23094        let mut buf = if avail_len < Self::ENCODED_LEN {
23095            payload_buf[0..avail_len].copy_from_slice(__input);
23096            Bytes::new(&payload_buf)
23097        } else {
23098            Bytes::new(__input)
23099        };
23100        let mut __struct = Self::default();
23101        __struct.param_index = buf.get_i16_le();
23102        __struct.target_system = buf.get_u8();
23103        __struct.target_component = buf.get_u8();
23104        for v in &mut __struct.param_id {
23105            let val = buf.get_u8();
23106            *v = val;
23107        }
23108        Ok(__struct)
23109    }
23110    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23111        let mut __tmp = BytesMut::new(bytes);
23112        #[allow(clippy::absurd_extreme_comparisons)]
23113        #[allow(unused_comparisons)]
23114        if __tmp.remaining() < Self::ENCODED_LEN {
23115            panic!(
23116                "buffer is too small (need {} bytes, but got {})",
23117                Self::ENCODED_LEN,
23118                __tmp.remaining(),
23119            )
23120        }
23121        __tmp.put_i16_le(self.param_index);
23122        __tmp.put_u8(self.target_system);
23123        __tmp.put_u8(self.target_component);
23124        for val in &self.param_id {
23125            __tmp.put_u8(*val);
23126        }
23127        if matches!(version, MavlinkVersion::V2) {
23128            let len = __tmp.len();
23129            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23130        } else {
23131            __tmp.len()
23132        }
23133    }
23134}
23135#[doc = "id: 23"]
23136#[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
23137#[derive(Debug, Clone, PartialEq)]
23138#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23139#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23140pub struct PARAM_SET_DATA {
23141    #[doc = "Onboard parameter value"]
23142    pub param_value: f32,
23143    #[doc = "System ID"]
23144    pub target_system: u8,
23145    #[doc = "Component ID"]
23146    pub target_component: u8,
23147    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23148    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23149    pub param_id: [u8; 16],
23150    #[doc = "Onboard parameter type."]
23151    pub param_type: MavParamType,
23152}
23153impl PARAM_SET_DATA {
23154    pub const ENCODED_LEN: usize = 23usize;
23155    pub const DEFAULT: Self = Self {
23156        param_value: 0.0_f32,
23157        target_system: 0_u8,
23158        target_component: 0_u8,
23159        param_id: [0_u8; 16usize],
23160        param_type: MavParamType::DEFAULT,
23161    };
23162    #[cfg(feature = "arbitrary")]
23163    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23164        use arbitrary::{Arbitrary, Unstructured};
23165        let mut buf = [0u8; 1024];
23166        rng.fill_bytes(&mut buf);
23167        let mut unstructured = Unstructured::new(&buf);
23168        Self::arbitrary(&mut unstructured).unwrap_or_default()
23169    }
23170}
23171impl Default for PARAM_SET_DATA {
23172    fn default() -> Self {
23173        Self::DEFAULT.clone()
23174    }
23175}
23176impl MessageData for PARAM_SET_DATA {
23177    type Message = MavMessage;
23178    const ID: u32 = 23u32;
23179    const NAME: &'static str = "PARAM_SET";
23180    const EXTRA_CRC: u8 = 168u8;
23181    const ENCODED_LEN: usize = 23usize;
23182    fn deser(
23183        _version: MavlinkVersion,
23184        __input: &[u8],
23185    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23186        let avail_len = __input.len();
23187        let mut payload_buf = [0; Self::ENCODED_LEN];
23188        let mut buf = if avail_len < Self::ENCODED_LEN {
23189            payload_buf[0..avail_len].copy_from_slice(__input);
23190            Bytes::new(&payload_buf)
23191        } else {
23192            Bytes::new(__input)
23193        };
23194        let mut __struct = Self::default();
23195        __struct.param_value = buf.get_f32_le();
23196        __struct.target_system = buf.get_u8();
23197        __struct.target_component = buf.get_u8();
23198        for v in &mut __struct.param_id {
23199            let val = buf.get_u8();
23200            *v = val;
23201        }
23202        let tmp = buf.get_u8();
23203        __struct.param_type =
23204            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23205                enum_type: "MavParamType",
23206                value: tmp as u32,
23207            })?;
23208        Ok(__struct)
23209    }
23210    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23211        let mut __tmp = BytesMut::new(bytes);
23212        #[allow(clippy::absurd_extreme_comparisons)]
23213        #[allow(unused_comparisons)]
23214        if __tmp.remaining() < Self::ENCODED_LEN {
23215            panic!(
23216                "buffer is too small (need {} bytes, but got {})",
23217                Self::ENCODED_LEN,
23218                __tmp.remaining(),
23219            )
23220        }
23221        __tmp.put_f32_le(self.param_value);
23222        __tmp.put_u8(self.target_system);
23223        __tmp.put_u8(self.target_component);
23224        for val in &self.param_id {
23225            __tmp.put_u8(*val);
23226        }
23227        __tmp.put_u8(self.param_type as u8);
23228        if matches!(version, MavlinkVersion::V2) {
23229            let len = __tmp.len();
23230            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23231        } else {
23232            __tmp.len()
23233        }
23234    }
23235}
23236#[doc = "id: 22"]
23237#[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
23238#[derive(Debug, Clone, PartialEq)]
23239#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23240#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23241pub struct PARAM_VALUE_DATA {
23242    #[doc = "Onboard parameter value"]
23243    pub param_value: f32,
23244    #[doc = "Total number of onboard parameters"]
23245    pub param_count: u16,
23246    #[doc = "Index of this onboard parameter"]
23247    pub param_index: u16,
23248    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23249    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23250    pub param_id: [u8; 16],
23251    #[doc = "Onboard parameter type."]
23252    pub param_type: MavParamType,
23253}
23254impl PARAM_VALUE_DATA {
23255    pub const ENCODED_LEN: usize = 25usize;
23256    pub const DEFAULT: Self = Self {
23257        param_value: 0.0_f32,
23258        param_count: 0_u16,
23259        param_index: 0_u16,
23260        param_id: [0_u8; 16usize],
23261        param_type: MavParamType::DEFAULT,
23262    };
23263    #[cfg(feature = "arbitrary")]
23264    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23265        use arbitrary::{Arbitrary, Unstructured};
23266        let mut buf = [0u8; 1024];
23267        rng.fill_bytes(&mut buf);
23268        let mut unstructured = Unstructured::new(&buf);
23269        Self::arbitrary(&mut unstructured).unwrap_or_default()
23270    }
23271}
23272impl Default for PARAM_VALUE_DATA {
23273    fn default() -> Self {
23274        Self::DEFAULT.clone()
23275    }
23276}
23277impl MessageData for PARAM_VALUE_DATA {
23278    type Message = MavMessage;
23279    const ID: u32 = 22u32;
23280    const NAME: &'static str = "PARAM_VALUE";
23281    const EXTRA_CRC: u8 = 220u8;
23282    const ENCODED_LEN: usize = 25usize;
23283    fn deser(
23284        _version: MavlinkVersion,
23285        __input: &[u8],
23286    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23287        let avail_len = __input.len();
23288        let mut payload_buf = [0; Self::ENCODED_LEN];
23289        let mut buf = if avail_len < Self::ENCODED_LEN {
23290            payload_buf[0..avail_len].copy_from_slice(__input);
23291            Bytes::new(&payload_buf)
23292        } else {
23293            Bytes::new(__input)
23294        };
23295        let mut __struct = Self::default();
23296        __struct.param_value = buf.get_f32_le();
23297        __struct.param_count = buf.get_u16_le();
23298        __struct.param_index = buf.get_u16_le();
23299        for v in &mut __struct.param_id {
23300            let val = buf.get_u8();
23301            *v = val;
23302        }
23303        let tmp = buf.get_u8();
23304        __struct.param_type =
23305            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23306                enum_type: "MavParamType",
23307                value: tmp as u32,
23308            })?;
23309        Ok(__struct)
23310    }
23311    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23312        let mut __tmp = BytesMut::new(bytes);
23313        #[allow(clippy::absurd_extreme_comparisons)]
23314        #[allow(unused_comparisons)]
23315        if __tmp.remaining() < Self::ENCODED_LEN {
23316            panic!(
23317                "buffer is too small (need {} bytes, but got {})",
23318                Self::ENCODED_LEN,
23319                __tmp.remaining(),
23320            )
23321        }
23322        __tmp.put_f32_le(self.param_value);
23323        __tmp.put_u16_le(self.param_count);
23324        __tmp.put_u16_le(self.param_index);
23325        for val in &self.param_id {
23326            __tmp.put_u8(*val);
23327        }
23328        __tmp.put_u8(self.param_type as u8);
23329        if matches!(version, MavlinkVersion::V2) {
23330            let len = __tmp.len();
23331            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23332        } else {
23333            __tmp.len()
23334        }
23335    }
23336}
23337#[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
23338#[doc = "id: 4"]
23339#[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
23340#[derive(Debug, Clone, PartialEq)]
23341#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23342#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23343pub struct PING_DATA {
23344    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23345    pub time_usec: u64,
23346    #[doc = "PING sequence"]
23347    pub seq: u32,
23348    #[doc = "0: request ping from all receiving systems. If greater than 0: message is a ping response and number is the system id of the requesting system"]
23349    pub target_system: u8,
23350    #[doc = "0: request ping from all receiving components. If greater than 0: message is a ping response and number is the component id of the requesting component."]
23351    pub target_component: u8,
23352}
23353impl PING_DATA {
23354    pub const ENCODED_LEN: usize = 14usize;
23355    pub const DEFAULT: Self = Self {
23356        time_usec: 0_u64,
23357        seq: 0_u32,
23358        target_system: 0_u8,
23359        target_component: 0_u8,
23360    };
23361    #[cfg(feature = "arbitrary")]
23362    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23363        use arbitrary::{Arbitrary, Unstructured};
23364        let mut buf = [0u8; 1024];
23365        rng.fill_bytes(&mut buf);
23366        let mut unstructured = Unstructured::new(&buf);
23367        Self::arbitrary(&mut unstructured).unwrap_or_default()
23368    }
23369}
23370impl Default for PING_DATA {
23371    fn default() -> Self {
23372        Self::DEFAULT.clone()
23373    }
23374}
23375impl MessageData for PING_DATA {
23376    type Message = MavMessage;
23377    const ID: u32 = 4u32;
23378    const NAME: &'static str = "PING";
23379    const EXTRA_CRC: u8 = 237u8;
23380    const ENCODED_LEN: usize = 14usize;
23381    fn deser(
23382        _version: MavlinkVersion,
23383        __input: &[u8],
23384    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23385        let avail_len = __input.len();
23386        let mut payload_buf = [0; Self::ENCODED_LEN];
23387        let mut buf = if avail_len < Self::ENCODED_LEN {
23388            payload_buf[0..avail_len].copy_from_slice(__input);
23389            Bytes::new(&payload_buf)
23390        } else {
23391            Bytes::new(__input)
23392        };
23393        let mut __struct = Self::default();
23394        __struct.time_usec = buf.get_u64_le();
23395        __struct.seq = buf.get_u32_le();
23396        __struct.target_system = buf.get_u8();
23397        __struct.target_component = buf.get_u8();
23398        Ok(__struct)
23399    }
23400    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23401        let mut __tmp = BytesMut::new(bytes);
23402        #[allow(clippy::absurd_extreme_comparisons)]
23403        #[allow(unused_comparisons)]
23404        if __tmp.remaining() < Self::ENCODED_LEN {
23405            panic!(
23406                "buffer is too small (need {} bytes, but got {})",
23407                Self::ENCODED_LEN,
23408                __tmp.remaining(),
23409            )
23410        }
23411        __tmp.put_u64_le(self.time_usec);
23412        __tmp.put_u32_le(self.seq);
23413        __tmp.put_u8(self.target_system);
23414        __tmp.put_u8(self.target_component);
23415        if matches!(version, MavlinkVersion::V2) {
23416            let len = __tmp.len();
23417            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23418        } else {
23419            __tmp.len()
23420        }
23421    }
23422}
23423#[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
23424#[doc = "id: 258"]
23425#[doc = "Control vehicle tone generation (buzzer)."]
23426#[derive(Debug, Clone, PartialEq)]
23427#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23428#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23429pub struct PLAY_TUNE_DATA {
23430    #[doc = "System ID"]
23431    pub target_system: u8,
23432    #[doc = "Component ID"]
23433    pub target_component: u8,
23434    #[doc = "tune in board specific format"]
23435    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23436    pub tune: [u8; 30],
23437    #[doc = "tune extension (appended to tune)"]
23438    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23439    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23440    pub tune2: [u8; 200],
23441}
23442impl PLAY_TUNE_DATA {
23443    pub const ENCODED_LEN: usize = 232usize;
23444    pub const DEFAULT: Self = Self {
23445        target_system: 0_u8,
23446        target_component: 0_u8,
23447        tune: [0_u8; 30usize],
23448        tune2: [0_u8; 200usize],
23449    };
23450    #[cfg(feature = "arbitrary")]
23451    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23452        use arbitrary::{Arbitrary, Unstructured};
23453        let mut buf = [0u8; 1024];
23454        rng.fill_bytes(&mut buf);
23455        let mut unstructured = Unstructured::new(&buf);
23456        Self::arbitrary(&mut unstructured).unwrap_or_default()
23457    }
23458}
23459impl Default for PLAY_TUNE_DATA {
23460    fn default() -> Self {
23461        Self::DEFAULT.clone()
23462    }
23463}
23464impl MessageData for PLAY_TUNE_DATA {
23465    type Message = MavMessage;
23466    const ID: u32 = 258u32;
23467    const NAME: &'static str = "PLAY_TUNE";
23468    const EXTRA_CRC: u8 = 187u8;
23469    const ENCODED_LEN: usize = 232usize;
23470    fn deser(
23471        _version: MavlinkVersion,
23472        __input: &[u8],
23473    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23474        let avail_len = __input.len();
23475        let mut payload_buf = [0; Self::ENCODED_LEN];
23476        let mut buf = if avail_len < Self::ENCODED_LEN {
23477            payload_buf[0..avail_len].copy_from_slice(__input);
23478            Bytes::new(&payload_buf)
23479        } else {
23480            Bytes::new(__input)
23481        };
23482        let mut __struct = Self::default();
23483        __struct.target_system = buf.get_u8();
23484        __struct.target_component = buf.get_u8();
23485        for v in &mut __struct.tune {
23486            let val = buf.get_u8();
23487            *v = val;
23488        }
23489        for v in &mut __struct.tune2 {
23490            let val = buf.get_u8();
23491            *v = val;
23492        }
23493        Ok(__struct)
23494    }
23495    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23496        let mut __tmp = BytesMut::new(bytes);
23497        #[allow(clippy::absurd_extreme_comparisons)]
23498        #[allow(unused_comparisons)]
23499        if __tmp.remaining() < Self::ENCODED_LEN {
23500            panic!(
23501                "buffer is too small (need {} bytes, but got {})",
23502                Self::ENCODED_LEN,
23503                __tmp.remaining(),
23504            )
23505        }
23506        __tmp.put_u8(self.target_system);
23507        __tmp.put_u8(self.target_component);
23508        for val in &self.tune {
23509            __tmp.put_u8(*val);
23510        }
23511        for val in &self.tune2 {
23512            __tmp.put_u8(*val);
23513        }
23514        if matches!(version, MavlinkVersion::V2) {
23515            let len = __tmp.len();
23516            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23517        } else {
23518            __tmp.len()
23519        }
23520    }
23521}
23522#[doc = "id: 400"]
23523#[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
23524#[derive(Debug, Clone, PartialEq)]
23525#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23526#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23527pub struct PLAY_TUNE_V2_DATA {
23528    #[doc = "Tune format"]
23529    pub format: TuneFormat,
23530    #[doc = "System ID"]
23531    pub target_system: u8,
23532    #[doc = "Component ID"]
23533    pub target_component: u8,
23534    #[doc = "Tune definition as a NULL-terminated string."]
23535    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23536    pub tune: [u8; 248],
23537}
23538impl PLAY_TUNE_V2_DATA {
23539    pub const ENCODED_LEN: usize = 254usize;
23540    pub const DEFAULT: Self = Self {
23541        format: TuneFormat::DEFAULT,
23542        target_system: 0_u8,
23543        target_component: 0_u8,
23544        tune: [0_u8; 248usize],
23545    };
23546    #[cfg(feature = "arbitrary")]
23547    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23548        use arbitrary::{Arbitrary, Unstructured};
23549        let mut buf = [0u8; 1024];
23550        rng.fill_bytes(&mut buf);
23551        let mut unstructured = Unstructured::new(&buf);
23552        Self::arbitrary(&mut unstructured).unwrap_or_default()
23553    }
23554}
23555impl Default for PLAY_TUNE_V2_DATA {
23556    fn default() -> Self {
23557        Self::DEFAULT.clone()
23558    }
23559}
23560impl MessageData for PLAY_TUNE_V2_DATA {
23561    type Message = MavMessage;
23562    const ID: u32 = 400u32;
23563    const NAME: &'static str = "PLAY_TUNE_V2";
23564    const EXTRA_CRC: u8 = 110u8;
23565    const ENCODED_LEN: usize = 254usize;
23566    fn deser(
23567        _version: MavlinkVersion,
23568        __input: &[u8],
23569    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23570        let avail_len = __input.len();
23571        let mut payload_buf = [0; Self::ENCODED_LEN];
23572        let mut buf = if avail_len < Self::ENCODED_LEN {
23573            payload_buf[0..avail_len].copy_from_slice(__input);
23574            Bytes::new(&payload_buf)
23575        } else {
23576            Bytes::new(__input)
23577        };
23578        let mut __struct = Self::default();
23579        let tmp = buf.get_u32_le();
23580        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
23581            ::mavlink_core::error::ParserError::InvalidEnum {
23582                enum_type: "TuneFormat",
23583                value: tmp as u32,
23584            },
23585        )?;
23586        __struct.target_system = buf.get_u8();
23587        __struct.target_component = buf.get_u8();
23588        for v in &mut __struct.tune {
23589            let val = buf.get_u8();
23590            *v = val;
23591        }
23592        Ok(__struct)
23593    }
23594    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23595        let mut __tmp = BytesMut::new(bytes);
23596        #[allow(clippy::absurd_extreme_comparisons)]
23597        #[allow(unused_comparisons)]
23598        if __tmp.remaining() < Self::ENCODED_LEN {
23599            panic!(
23600                "buffer is too small (need {} bytes, but got {})",
23601                Self::ENCODED_LEN,
23602                __tmp.remaining(),
23603            )
23604        }
23605        __tmp.put_u32_le(self.format as u32);
23606        __tmp.put_u8(self.target_system);
23607        __tmp.put_u8(self.target_component);
23608        for val in &self.tune {
23609            __tmp.put_u8(*val);
23610        }
23611        if matches!(version, MavlinkVersion::V2) {
23612            let len = __tmp.len();
23613            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23614        } else {
23615            __tmp.len()
23616        }
23617    }
23618}
23619#[doc = "id: 87"]
23620#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
23621#[derive(Debug, Clone, PartialEq)]
23622#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23623#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23624pub struct POSITION_TARGET_GLOBAL_INT_DATA {
23625    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
23626    pub time_boot_ms: u32,
23627    #[doc = "Latitude in WGS84 frame"]
23628    pub lat_int: i32,
23629    #[doc = "Longitude in WGS84 frame"]
23630    pub lon_int: i32,
23631    #[doc = "Altitude (MSL, AGL or relative to home altitude, depending on frame)"]
23632    pub alt: f32,
23633    #[doc = "X velocity in NED frame"]
23634    pub vx: f32,
23635    #[doc = "Y velocity in NED frame"]
23636    pub vy: f32,
23637    #[doc = "Z velocity in NED frame"]
23638    pub vz: f32,
23639    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
23640    pub afx: f32,
23641    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
23642    pub afy: f32,
23643    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
23644    pub afz: f32,
23645    #[doc = "yaw setpoint"]
23646    pub yaw: f32,
23647    #[doc = "yaw rate setpoint"]
23648    pub yaw_rate: f32,
23649    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
23650    pub type_mask: PositionTargetTypemask,
23651    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
23652    pub coordinate_frame: MavFrame,
23653}
23654impl POSITION_TARGET_GLOBAL_INT_DATA {
23655    pub const ENCODED_LEN: usize = 51usize;
23656    pub const DEFAULT: Self = Self {
23657        time_boot_ms: 0_u32,
23658        lat_int: 0_i32,
23659        lon_int: 0_i32,
23660        alt: 0.0_f32,
23661        vx: 0.0_f32,
23662        vy: 0.0_f32,
23663        vz: 0.0_f32,
23664        afx: 0.0_f32,
23665        afy: 0.0_f32,
23666        afz: 0.0_f32,
23667        yaw: 0.0_f32,
23668        yaw_rate: 0.0_f32,
23669        type_mask: PositionTargetTypemask::DEFAULT,
23670        coordinate_frame: MavFrame::DEFAULT,
23671    };
23672    #[cfg(feature = "arbitrary")]
23673    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23674        use arbitrary::{Arbitrary, Unstructured};
23675        let mut buf = [0u8; 1024];
23676        rng.fill_bytes(&mut buf);
23677        let mut unstructured = Unstructured::new(&buf);
23678        Self::arbitrary(&mut unstructured).unwrap_or_default()
23679    }
23680}
23681impl Default for POSITION_TARGET_GLOBAL_INT_DATA {
23682    fn default() -> Self {
23683        Self::DEFAULT.clone()
23684    }
23685}
23686impl MessageData for POSITION_TARGET_GLOBAL_INT_DATA {
23687    type Message = MavMessage;
23688    const ID: u32 = 87u32;
23689    const NAME: &'static str = "POSITION_TARGET_GLOBAL_INT";
23690    const EXTRA_CRC: u8 = 150u8;
23691    const ENCODED_LEN: usize = 51usize;
23692    fn deser(
23693        _version: MavlinkVersion,
23694        __input: &[u8],
23695    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23696        let avail_len = __input.len();
23697        let mut payload_buf = [0; Self::ENCODED_LEN];
23698        let mut buf = if avail_len < Self::ENCODED_LEN {
23699            payload_buf[0..avail_len].copy_from_slice(__input);
23700            Bytes::new(&payload_buf)
23701        } else {
23702            Bytes::new(__input)
23703        };
23704        let mut __struct = Self::default();
23705        __struct.time_boot_ms = buf.get_u32_le();
23706        __struct.lat_int = buf.get_i32_le();
23707        __struct.lon_int = buf.get_i32_le();
23708        __struct.alt = buf.get_f32_le();
23709        __struct.vx = buf.get_f32_le();
23710        __struct.vy = buf.get_f32_le();
23711        __struct.vz = buf.get_f32_le();
23712        __struct.afx = buf.get_f32_le();
23713        __struct.afy = buf.get_f32_le();
23714        __struct.afz = buf.get_f32_le();
23715        __struct.yaw = buf.get_f32_le();
23716        __struct.yaw_rate = buf.get_f32_le();
23717        let tmp = buf.get_u16_le();
23718        __struct.type_mask = PositionTargetTypemask::from_bits(
23719            tmp & PositionTargetTypemask::all().bits(),
23720        )
23721        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
23722            flag_type: "PositionTargetTypemask",
23723            value: tmp as u32,
23724        })?;
23725        let tmp = buf.get_u8();
23726        __struct.coordinate_frame =
23727            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23728                enum_type: "MavFrame",
23729                value: tmp as u32,
23730            })?;
23731        Ok(__struct)
23732    }
23733    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23734        let mut __tmp = BytesMut::new(bytes);
23735        #[allow(clippy::absurd_extreme_comparisons)]
23736        #[allow(unused_comparisons)]
23737        if __tmp.remaining() < Self::ENCODED_LEN {
23738            panic!(
23739                "buffer is too small (need {} bytes, but got {})",
23740                Self::ENCODED_LEN,
23741                __tmp.remaining(),
23742            )
23743        }
23744        __tmp.put_u32_le(self.time_boot_ms);
23745        __tmp.put_i32_le(self.lat_int);
23746        __tmp.put_i32_le(self.lon_int);
23747        __tmp.put_f32_le(self.alt);
23748        __tmp.put_f32_le(self.vx);
23749        __tmp.put_f32_le(self.vy);
23750        __tmp.put_f32_le(self.vz);
23751        __tmp.put_f32_le(self.afx);
23752        __tmp.put_f32_le(self.afy);
23753        __tmp.put_f32_le(self.afz);
23754        __tmp.put_f32_le(self.yaw);
23755        __tmp.put_f32_le(self.yaw_rate);
23756        __tmp.put_u16_le(self.type_mask.bits());
23757        __tmp.put_u8(self.coordinate_frame as u8);
23758        if matches!(version, MavlinkVersion::V2) {
23759            let len = __tmp.len();
23760            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23761        } else {
23762            __tmp.len()
23763        }
23764    }
23765}
23766#[doc = "id: 85"]
23767#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
23768#[derive(Debug, Clone, PartialEq)]
23769#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23770#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23771pub struct POSITION_TARGET_LOCAL_NED_DATA {
23772    #[doc = "Timestamp (time since system boot)."]
23773    pub time_boot_ms: u32,
23774    #[doc = "X Position in NED frame"]
23775    pub x: f32,
23776    #[doc = "Y Position in NED frame"]
23777    pub y: f32,
23778    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
23779    pub z: f32,
23780    #[doc = "X velocity in NED frame"]
23781    pub vx: f32,
23782    #[doc = "Y velocity in NED frame"]
23783    pub vy: f32,
23784    #[doc = "Z velocity in NED frame"]
23785    pub vz: f32,
23786    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
23787    pub afx: f32,
23788    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
23789    pub afy: f32,
23790    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
23791    pub afz: f32,
23792    #[doc = "yaw setpoint"]
23793    pub yaw: f32,
23794    #[doc = "yaw rate setpoint"]
23795    pub yaw_rate: f32,
23796    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
23797    pub type_mask: PositionTargetTypemask,
23798    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
23799    pub coordinate_frame: MavFrame,
23800}
23801impl POSITION_TARGET_LOCAL_NED_DATA {
23802    pub const ENCODED_LEN: usize = 51usize;
23803    pub const DEFAULT: Self = Self {
23804        time_boot_ms: 0_u32,
23805        x: 0.0_f32,
23806        y: 0.0_f32,
23807        z: 0.0_f32,
23808        vx: 0.0_f32,
23809        vy: 0.0_f32,
23810        vz: 0.0_f32,
23811        afx: 0.0_f32,
23812        afy: 0.0_f32,
23813        afz: 0.0_f32,
23814        yaw: 0.0_f32,
23815        yaw_rate: 0.0_f32,
23816        type_mask: PositionTargetTypemask::DEFAULT,
23817        coordinate_frame: MavFrame::DEFAULT,
23818    };
23819    #[cfg(feature = "arbitrary")]
23820    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23821        use arbitrary::{Arbitrary, Unstructured};
23822        let mut buf = [0u8; 1024];
23823        rng.fill_bytes(&mut buf);
23824        let mut unstructured = Unstructured::new(&buf);
23825        Self::arbitrary(&mut unstructured).unwrap_or_default()
23826    }
23827}
23828impl Default for POSITION_TARGET_LOCAL_NED_DATA {
23829    fn default() -> Self {
23830        Self::DEFAULT.clone()
23831    }
23832}
23833impl MessageData for POSITION_TARGET_LOCAL_NED_DATA {
23834    type Message = MavMessage;
23835    const ID: u32 = 85u32;
23836    const NAME: &'static str = "POSITION_TARGET_LOCAL_NED";
23837    const EXTRA_CRC: u8 = 140u8;
23838    const ENCODED_LEN: usize = 51usize;
23839    fn deser(
23840        _version: MavlinkVersion,
23841        __input: &[u8],
23842    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23843        let avail_len = __input.len();
23844        let mut payload_buf = [0; Self::ENCODED_LEN];
23845        let mut buf = if avail_len < Self::ENCODED_LEN {
23846            payload_buf[0..avail_len].copy_from_slice(__input);
23847            Bytes::new(&payload_buf)
23848        } else {
23849            Bytes::new(__input)
23850        };
23851        let mut __struct = Self::default();
23852        __struct.time_boot_ms = buf.get_u32_le();
23853        __struct.x = buf.get_f32_le();
23854        __struct.y = buf.get_f32_le();
23855        __struct.z = buf.get_f32_le();
23856        __struct.vx = buf.get_f32_le();
23857        __struct.vy = buf.get_f32_le();
23858        __struct.vz = buf.get_f32_le();
23859        __struct.afx = buf.get_f32_le();
23860        __struct.afy = buf.get_f32_le();
23861        __struct.afz = buf.get_f32_le();
23862        __struct.yaw = buf.get_f32_le();
23863        __struct.yaw_rate = buf.get_f32_le();
23864        let tmp = buf.get_u16_le();
23865        __struct.type_mask = PositionTargetTypemask::from_bits(
23866            tmp & PositionTargetTypemask::all().bits(),
23867        )
23868        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
23869            flag_type: "PositionTargetTypemask",
23870            value: tmp as u32,
23871        })?;
23872        let tmp = buf.get_u8();
23873        __struct.coordinate_frame =
23874            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23875                enum_type: "MavFrame",
23876                value: tmp as u32,
23877            })?;
23878        Ok(__struct)
23879    }
23880    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23881        let mut __tmp = BytesMut::new(bytes);
23882        #[allow(clippy::absurd_extreme_comparisons)]
23883        #[allow(unused_comparisons)]
23884        if __tmp.remaining() < Self::ENCODED_LEN {
23885            panic!(
23886                "buffer is too small (need {} bytes, but got {})",
23887                Self::ENCODED_LEN,
23888                __tmp.remaining(),
23889            )
23890        }
23891        __tmp.put_u32_le(self.time_boot_ms);
23892        __tmp.put_f32_le(self.x);
23893        __tmp.put_f32_le(self.y);
23894        __tmp.put_f32_le(self.z);
23895        __tmp.put_f32_le(self.vx);
23896        __tmp.put_f32_le(self.vy);
23897        __tmp.put_f32_le(self.vz);
23898        __tmp.put_f32_le(self.afx);
23899        __tmp.put_f32_le(self.afy);
23900        __tmp.put_f32_le(self.afz);
23901        __tmp.put_f32_le(self.yaw);
23902        __tmp.put_f32_le(self.yaw_rate);
23903        __tmp.put_u16_le(self.type_mask.bits());
23904        __tmp.put_u8(self.coordinate_frame as u8);
23905        if matches!(version, MavlinkVersion::V2) {
23906            let len = __tmp.len();
23907            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23908        } else {
23909            __tmp.len()
23910        }
23911    }
23912}
23913#[doc = "id: 125"]
23914#[doc = "Power supply status."]
23915#[derive(Debug, Clone, PartialEq)]
23916#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23917#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23918pub struct POWER_STATUS_DATA {
23919    #[doc = "5V rail voltage."]
23920    pub Vcc: u16,
23921    #[doc = "Servo rail voltage."]
23922    pub Vservo: u16,
23923    #[doc = "Bitmap of power supply status flags."]
23924    pub flags: MavPowerStatus,
23925}
23926impl POWER_STATUS_DATA {
23927    pub const ENCODED_LEN: usize = 6usize;
23928    pub const DEFAULT: Self = Self {
23929        Vcc: 0_u16,
23930        Vservo: 0_u16,
23931        flags: MavPowerStatus::DEFAULT,
23932    };
23933    #[cfg(feature = "arbitrary")]
23934    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23935        use arbitrary::{Arbitrary, Unstructured};
23936        let mut buf = [0u8; 1024];
23937        rng.fill_bytes(&mut buf);
23938        let mut unstructured = Unstructured::new(&buf);
23939        Self::arbitrary(&mut unstructured).unwrap_or_default()
23940    }
23941}
23942impl Default for POWER_STATUS_DATA {
23943    fn default() -> Self {
23944        Self::DEFAULT.clone()
23945    }
23946}
23947impl MessageData for POWER_STATUS_DATA {
23948    type Message = MavMessage;
23949    const ID: u32 = 125u32;
23950    const NAME: &'static str = "POWER_STATUS";
23951    const EXTRA_CRC: u8 = 203u8;
23952    const ENCODED_LEN: usize = 6usize;
23953    fn deser(
23954        _version: MavlinkVersion,
23955        __input: &[u8],
23956    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23957        let avail_len = __input.len();
23958        let mut payload_buf = [0; Self::ENCODED_LEN];
23959        let mut buf = if avail_len < Self::ENCODED_LEN {
23960            payload_buf[0..avail_len].copy_from_slice(__input);
23961            Bytes::new(&payload_buf)
23962        } else {
23963            Bytes::new(__input)
23964        };
23965        let mut __struct = Self::default();
23966        __struct.Vcc = buf.get_u16_le();
23967        __struct.Vservo = buf.get_u16_le();
23968        let tmp = buf.get_u16_le();
23969        __struct.flags = MavPowerStatus::from_bits(tmp & MavPowerStatus::all().bits()).ok_or(
23970            ::mavlink_core::error::ParserError::InvalidFlag {
23971                flag_type: "MavPowerStatus",
23972                value: tmp as u32,
23973            },
23974        )?;
23975        Ok(__struct)
23976    }
23977    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23978        let mut __tmp = BytesMut::new(bytes);
23979        #[allow(clippy::absurd_extreme_comparisons)]
23980        #[allow(unused_comparisons)]
23981        if __tmp.remaining() < Self::ENCODED_LEN {
23982            panic!(
23983                "buffer is too small (need {} bytes, but got {})",
23984                Self::ENCODED_LEN,
23985                __tmp.remaining(),
23986            )
23987        }
23988        __tmp.put_u16_le(self.Vcc);
23989        __tmp.put_u16_le(self.Vservo);
23990        __tmp.put_u16_le(self.flags.bits());
23991        if matches!(version, MavlinkVersion::V2) {
23992            let len = __tmp.len();
23993            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23994        } else {
23995            __tmp.len()
23996        }
23997    }
23998}
23999#[doc = "id: 300"]
24000#[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
24001#[derive(Debug, Clone, PartialEq)]
24002#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24003#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24004pub struct PROTOCOL_VERSION_DATA {
24005    #[doc = "Currently active MAVLink version number * 100: v1.0 is 100, v2.0 is 200, etc."]
24006    pub version: u16,
24007    #[doc = "Minimum MAVLink version supported"]
24008    pub min_version: u16,
24009    #[doc = "Maximum MAVLink version supported (set to the same value as version by default)"]
24010    pub max_version: u16,
24011    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
24012    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24013    pub spec_version_hash: [u8; 8],
24014    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
24015    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24016    pub library_version_hash: [u8; 8],
24017}
24018impl PROTOCOL_VERSION_DATA {
24019    pub const ENCODED_LEN: usize = 22usize;
24020    pub const DEFAULT: Self = Self {
24021        version: 0_u16,
24022        min_version: 0_u16,
24023        max_version: 0_u16,
24024        spec_version_hash: [0_u8; 8usize],
24025        library_version_hash: [0_u8; 8usize],
24026    };
24027    #[cfg(feature = "arbitrary")]
24028    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24029        use arbitrary::{Arbitrary, Unstructured};
24030        let mut buf = [0u8; 1024];
24031        rng.fill_bytes(&mut buf);
24032        let mut unstructured = Unstructured::new(&buf);
24033        Self::arbitrary(&mut unstructured).unwrap_or_default()
24034    }
24035}
24036impl Default for PROTOCOL_VERSION_DATA {
24037    fn default() -> Self {
24038        Self::DEFAULT.clone()
24039    }
24040}
24041impl MessageData for PROTOCOL_VERSION_DATA {
24042    type Message = MavMessage;
24043    const ID: u32 = 300u32;
24044    const NAME: &'static str = "PROTOCOL_VERSION";
24045    const EXTRA_CRC: u8 = 217u8;
24046    const ENCODED_LEN: usize = 22usize;
24047    fn deser(
24048        _version: MavlinkVersion,
24049        __input: &[u8],
24050    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24051        let avail_len = __input.len();
24052        let mut payload_buf = [0; Self::ENCODED_LEN];
24053        let mut buf = if avail_len < Self::ENCODED_LEN {
24054            payload_buf[0..avail_len].copy_from_slice(__input);
24055            Bytes::new(&payload_buf)
24056        } else {
24057            Bytes::new(__input)
24058        };
24059        let mut __struct = Self::default();
24060        __struct.version = buf.get_u16_le();
24061        __struct.min_version = buf.get_u16_le();
24062        __struct.max_version = buf.get_u16_le();
24063        for v in &mut __struct.spec_version_hash {
24064            let val = buf.get_u8();
24065            *v = val;
24066        }
24067        for v in &mut __struct.library_version_hash {
24068            let val = buf.get_u8();
24069            *v = val;
24070        }
24071        Ok(__struct)
24072    }
24073    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24074        let mut __tmp = BytesMut::new(bytes);
24075        #[allow(clippy::absurd_extreme_comparisons)]
24076        #[allow(unused_comparisons)]
24077        if __tmp.remaining() < Self::ENCODED_LEN {
24078            panic!(
24079                "buffer is too small (need {} bytes, but got {})",
24080                Self::ENCODED_LEN,
24081                __tmp.remaining(),
24082            )
24083        }
24084        __tmp.put_u16_le(self.version);
24085        __tmp.put_u16_le(self.min_version);
24086        __tmp.put_u16_le(self.max_version);
24087        for val in &self.spec_version_hash {
24088            __tmp.put_u8(*val);
24089        }
24090        for val in &self.library_version_hash {
24091            __tmp.put_u8(*val);
24092        }
24093        if matches!(version, MavlinkVersion::V2) {
24094            let len = __tmp.len();
24095            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24096        } else {
24097            __tmp.len()
24098        }
24099    }
24100}
24101#[doc = "id: 109"]
24102#[doc = "Status generated by radio and injected into MAVLink stream."]
24103#[derive(Debug, Clone, PartialEq)]
24104#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24105#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24106pub struct RADIO_STATUS_DATA {
24107    #[doc = "Count of radio packet receive errors (since boot)."]
24108    pub rxerrors: u16,
24109    #[doc = "Count of error corrected radio packets (since boot)."]
24110    pub fixed: u16,
24111    #[doc = "Local (message sender) received signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
24112    pub rssi: u8,
24113    #[doc = "Remote (message receiver) signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
24114    pub remrssi: u8,
24115    #[doc = "Remaining free transmitter buffer space."]
24116    pub txbuf: u8,
24117    #[doc = "Local background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
24118    pub noise: u8,
24119    #[doc = "Remote background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
24120    pub remnoise: u8,
24121}
24122impl RADIO_STATUS_DATA {
24123    pub const ENCODED_LEN: usize = 9usize;
24124    pub const DEFAULT: Self = Self {
24125        rxerrors: 0_u16,
24126        fixed: 0_u16,
24127        rssi: 0_u8,
24128        remrssi: 0_u8,
24129        txbuf: 0_u8,
24130        noise: 0_u8,
24131        remnoise: 0_u8,
24132    };
24133    #[cfg(feature = "arbitrary")]
24134    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24135        use arbitrary::{Arbitrary, Unstructured};
24136        let mut buf = [0u8; 1024];
24137        rng.fill_bytes(&mut buf);
24138        let mut unstructured = Unstructured::new(&buf);
24139        Self::arbitrary(&mut unstructured).unwrap_or_default()
24140    }
24141}
24142impl Default for RADIO_STATUS_DATA {
24143    fn default() -> Self {
24144        Self::DEFAULT.clone()
24145    }
24146}
24147impl MessageData for RADIO_STATUS_DATA {
24148    type Message = MavMessage;
24149    const ID: u32 = 109u32;
24150    const NAME: &'static str = "RADIO_STATUS";
24151    const EXTRA_CRC: u8 = 185u8;
24152    const ENCODED_LEN: usize = 9usize;
24153    fn deser(
24154        _version: MavlinkVersion,
24155        __input: &[u8],
24156    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24157        let avail_len = __input.len();
24158        let mut payload_buf = [0; Self::ENCODED_LEN];
24159        let mut buf = if avail_len < Self::ENCODED_LEN {
24160            payload_buf[0..avail_len].copy_from_slice(__input);
24161            Bytes::new(&payload_buf)
24162        } else {
24163            Bytes::new(__input)
24164        };
24165        let mut __struct = Self::default();
24166        __struct.rxerrors = buf.get_u16_le();
24167        __struct.fixed = buf.get_u16_le();
24168        __struct.rssi = buf.get_u8();
24169        __struct.remrssi = buf.get_u8();
24170        __struct.txbuf = buf.get_u8();
24171        __struct.noise = buf.get_u8();
24172        __struct.remnoise = buf.get_u8();
24173        Ok(__struct)
24174    }
24175    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24176        let mut __tmp = BytesMut::new(bytes);
24177        #[allow(clippy::absurd_extreme_comparisons)]
24178        #[allow(unused_comparisons)]
24179        if __tmp.remaining() < Self::ENCODED_LEN {
24180            panic!(
24181                "buffer is too small (need {} bytes, but got {})",
24182                Self::ENCODED_LEN,
24183                __tmp.remaining(),
24184            )
24185        }
24186        __tmp.put_u16_le(self.rxerrors);
24187        __tmp.put_u16_le(self.fixed);
24188        __tmp.put_u8(self.rssi);
24189        __tmp.put_u8(self.remrssi);
24190        __tmp.put_u8(self.txbuf);
24191        __tmp.put_u8(self.noise);
24192        __tmp.put_u8(self.remnoise);
24193        if matches!(version, MavlinkVersion::V2) {
24194            let len = __tmp.len();
24195            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24196        } else {
24197            __tmp.len()
24198        }
24199    }
24200}
24201#[doc = "id: 27"]
24202#[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
24203#[derive(Debug, Clone, PartialEq)]
24204#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24205#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24206pub struct RAW_IMU_DATA {
24207    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
24208    pub time_usec: u64,
24209    #[doc = "X acceleration (raw)"]
24210    pub xacc: i16,
24211    #[doc = "Y acceleration (raw)"]
24212    pub yacc: i16,
24213    #[doc = "Z acceleration (raw)"]
24214    pub zacc: i16,
24215    #[doc = "Angular speed around X axis (raw)"]
24216    pub xgyro: i16,
24217    #[doc = "Angular speed around Y axis (raw)"]
24218    pub ygyro: i16,
24219    #[doc = "Angular speed around Z axis (raw)"]
24220    pub zgyro: i16,
24221    #[doc = "X Magnetic field (raw)"]
24222    pub xmag: i16,
24223    #[doc = "Y Magnetic field (raw)"]
24224    pub ymag: i16,
24225    #[doc = "Z Magnetic field (raw)"]
24226    pub zmag: i16,
24227    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
24228    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24229    pub id: u8,
24230    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
24231    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24232    pub temperature: i16,
24233}
24234impl RAW_IMU_DATA {
24235    pub const ENCODED_LEN: usize = 29usize;
24236    pub const DEFAULT: Self = Self {
24237        time_usec: 0_u64,
24238        xacc: 0_i16,
24239        yacc: 0_i16,
24240        zacc: 0_i16,
24241        xgyro: 0_i16,
24242        ygyro: 0_i16,
24243        zgyro: 0_i16,
24244        xmag: 0_i16,
24245        ymag: 0_i16,
24246        zmag: 0_i16,
24247        id: 0_u8,
24248        temperature: 0_i16,
24249    };
24250    #[cfg(feature = "arbitrary")]
24251    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24252        use arbitrary::{Arbitrary, Unstructured};
24253        let mut buf = [0u8; 1024];
24254        rng.fill_bytes(&mut buf);
24255        let mut unstructured = Unstructured::new(&buf);
24256        Self::arbitrary(&mut unstructured).unwrap_or_default()
24257    }
24258}
24259impl Default for RAW_IMU_DATA {
24260    fn default() -> Self {
24261        Self::DEFAULT.clone()
24262    }
24263}
24264impl MessageData for RAW_IMU_DATA {
24265    type Message = MavMessage;
24266    const ID: u32 = 27u32;
24267    const NAME: &'static str = "RAW_IMU";
24268    const EXTRA_CRC: u8 = 144u8;
24269    const ENCODED_LEN: usize = 29usize;
24270    fn deser(
24271        _version: MavlinkVersion,
24272        __input: &[u8],
24273    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24274        let avail_len = __input.len();
24275        let mut payload_buf = [0; Self::ENCODED_LEN];
24276        let mut buf = if avail_len < Self::ENCODED_LEN {
24277            payload_buf[0..avail_len].copy_from_slice(__input);
24278            Bytes::new(&payload_buf)
24279        } else {
24280            Bytes::new(__input)
24281        };
24282        let mut __struct = Self::default();
24283        __struct.time_usec = buf.get_u64_le();
24284        __struct.xacc = buf.get_i16_le();
24285        __struct.yacc = buf.get_i16_le();
24286        __struct.zacc = buf.get_i16_le();
24287        __struct.xgyro = buf.get_i16_le();
24288        __struct.ygyro = buf.get_i16_le();
24289        __struct.zgyro = buf.get_i16_le();
24290        __struct.xmag = buf.get_i16_le();
24291        __struct.ymag = buf.get_i16_le();
24292        __struct.zmag = buf.get_i16_le();
24293        __struct.id = buf.get_u8();
24294        __struct.temperature = buf.get_i16_le();
24295        Ok(__struct)
24296    }
24297    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24298        let mut __tmp = BytesMut::new(bytes);
24299        #[allow(clippy::absurd_extreme_comparisons)]
24300        #[allow(unused_comparisons)]
24301        if __tmp.remaining() < Self::ENCODED_LEN {
24302            panic!(
24303                "buffer is too small (need {} bytes, but got {})",
24304                Self::ENCODED_LEN,
24305                __tmp.remaining(),
24306            )
24307        }
24308        __tmp.put_u64_le(self.time_usec);
24309        __tmp.put_i16_le(self.xacc);
24310        __tmp.put_i16_le(self.yacc);
24311        __tmp.put_i16_le(self.zacc);
24312        __tmp.put_i16_le(self.xgyro);
24313        __tmp.put_i16_le(self.ygyro);
24314        __tmp.put_i16_le(self.zgyro);
24315        __tmp.put_i16_le(self.xmag);
24316        __tmp.put_i16_le(self.ymag);
24317        __tmp.put_i16_le(self.zmag);
24318        __tmp.put_u8(self.id);
24319        __tmp.put_i16_le(self.temperature);
24320        if matches!(version, MavlinkVersion::V2) {
24321            let len = __tmp.len();
24322            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24323        } else {
24324            __tmp.len()
24325        }
24326    }
24327}
24328#[doc = "id: 28"]
24329#[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
24330#[derive(Debug, Clone, PartialEq)]
24331#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24332#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24333pub struct RAW_PRESSURE_DATA {
24334    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
24335    pub time_usec: u64,
24336    #[doc = "Absolute pressure (raw)"]
24337    pub press_abs: i16,
24338    #[doc = "Differential pressure 1 (raw, 0 if nonexistent)"]
24339    pub press_diff1: i16,
24340    #[doc = "Differential pressure 2 (raw, 0 if nonexistent)"]
24341    pub press_diff2: i16,
24342    #[doc = "Raw Temperature measurement (raw)"]
24343    pub temperature: i16,
24344}
24345impl RAW_PRESSURE_DATA {
24346    pub const ENCODED_LEN: usize = 16usize;
24347    pub const DEFAULT: Self = Self {
24348        time_usec: 0_u64,
24349        press_abs: 0_i16,
24350        press_diff1: 0_i16,
24351        press_diff2: 0_i16,
24352        temperature: 0_i16,
24353    };
24354    #[cfg(feature = "arbitrary")]
24355    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24356        use arbitrary::{Arbitrary, Unstructured};
24357        let mut buf = [0u8; 1024];
24358        rng.fill_bytes(&mut buf);
24359        let mut unstructured = Unstructured::new(&buf);
24360        Self::arbitrary(&mut unstructured).unwrap_or_default()
24361    }
24362}
24363impl Default for RAW_PRESSURE_DATA {
24364    fn default() -> Self {
24365        Self::DEFAULT.clone()
24366    }
24367}
24368impl MessageData for RAW_PRESSURE_DATA {
24369    type Message = MavMessage;
24370    const ID: u32 = 28u32;
24371    const NAME: &'static str = "RAW_PRESSURE";
24372    const EXTRA_CRC: u8 = 67u8;
24373    const ENCODED_LEN: usize = 16usize;
24374    fn deser(
24375        _version: MavlinkVersion,
24376        __input: &[u8],
24377    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24378        let avail_len = __input.len();
24379        let mut payload_buf = [0; Self::ENCODED_LEN];
24380        let mut buf = if avail_len < Self::ENCODED_LEN {
24381            payload_buf[0..avail_len].copy_from_slice(__input);
24382            Bytes::new(&payload_buf)
24383        } else {
24384            Bytes::new(__input)
24385        };
24386        let mut __struct = Self::default();
24387        __struct.time_usec = buf.get_u64_le();
24388        __struct.press_abs = buf.get_i16_le();
24389        __struct.press_diff1 = buf.get_i16_le();
24390        __struct.press_diff2 = buf.get_i16_le();
24391        __struct.temperature = buf.get_i16_le();
24392        Ok(__struct)
24393    }
24394    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24395        let mut __tmp = BytesMut::new(bytes);
24396        #[allow(clippy::absurd_extreme_comparisons)]
24397        #[allow(unused_comparisons)]
24398        if __tmp.remaining() < Self::ENCODED_LEN {
24399            panic!(
24400                "buffer is too small (need {} bytes, but got {})",
24401                Self::ENCODED_LEN,
24402                __tmp.remaining(),
24403            )
24404        }
24405        __tmp.put_u64_le(self.time_usec);
24406        __tmp.put_i16_le(self.press_abs);
24407        __tmp.put_i16_le(self.press_diff1);
24408        __tmp.put_i16_le(self.press_diff2);
24409        __tmp.put_i16_le(self.temperature);
24410        if matches!(version, MavlinkVersion::V2) {
24411            let len = __tmp.len();
24412            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24413        } else {
24414            __tmp.len()
24415        }
24416    }
24417}
24418#[doc = "id: 339"]
24419#[doc = "RPM sensor data message."]
24420#[derive(Debug, Clone, PartialEq)]
24421#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24422#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24423pub struct RAW_RPM_DATA {
24424    #[doc = "Indicated rate"]
24425    pub frequency: f32,
24426    #[doc = "Index of this RPM sensor (0-indexed)"]
24427    pub index: u8,
24428}
24429impl RAW_RPM_DATA {
24430    pub const ENCODED_LEN: usize = 5usize;
24431    pub const DEFAULT: Self = Self {
24432        frequency: 0.0_f32,
24433        index: 0_u8,
24434    };
24435    #[cfg(feature = "arbitrary")]
24436    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24437        use arbitrary::{Arbitrary, Unstructured};
24438        let mut buf = [0u8; 1024];
24439        rng.fill_bytes(&mut buf);
24440        let mut unstructured = Unstructured::new(&buf);
24441        Self::arbitrary(&mut unstructured).unwrap_or_default()
24442    }
24443}
24444impl Default for RAW_RPM_DATA {
24445    fn default() -> Self {
24446        Self::DEFAULT.clone()
24447    }
24448}
24449impl MessageData for RAW_RPM_DATA {
24450    type Message = MavMessage;
24451    const ID: u32 = 339u32;
24452    const NAME: &'static str = "RAW_RPM";
24453    const EXTRA_CRC: u8 = 199u8;
24454    const ENCODED_LEN: usize = 5usize;
24455    fn deser(
24456        _version: MavlinkVersion,
24457        __input: &[u8],
24458    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24459        let avail_len = __input.len();
24460        let mut payload_buf = [0; Self::ENCODED_LEN];
24461        let mut buf = if avail_len < Self::ENCODED_LEN {
24462            payload_buf[0..avail_len].copy_from_slice(__input);
24463            Bytes::new(&payload_buf)
24464        } else {
24465            Bytes::new(__input)
24466        };
24467        let mut __struct = Self::default();
24468        __struct.frequency = buf.get_f32_le();
24469        __struct.index = buf.get_u8();
24470        Ok(__struct)
24471    }
24472    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24473        let mut __tmp = BytesMut::new(bytes);
24474        #[allow(clippy::absurd_extreme_comparisons)]
24475        #[allow(unused_comparisons)]
24476        if __tmp.remaining() < Self::ENCODED_LEN {
24477            panic!(
24478                "buffer is too small (need {} bytes, but got {})",
24479                Self::ENCODED_LEN,
24480                __tmp.remaining(),
24481            )
24482        }
24483        __tmp.put_f32_le(self.frequency);
24484        __tmp.put_u8(self.index);
24485        if matches!(version, MavlinkVersion::V2) {
24486            let len = __tmp.len();
24487            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24488        } else {
24489            __tmp.len()
24490        }
24491    }
24492}
24493#[doc = "id: 65"]
24494#[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
24495#[derive(Debug, Clone, PartialEq)]
24496#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24497#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24498pub struct RC_CHANNELS_DATA {
24499    #[doc = "Timestamp (time since system boot)."]
24500    pub time_boot_ms: u32,
24501    #[doc = "RC channel 1 value."]
24502    pub chan1_raw: u16,
24503    #[doc = "RC channel 2 value."]
24504    pub chan2_raw: u16,
24505    #[doc = "RC channel 3 value."]
24506    pub chan3_raw: u16,
24507    #[doc = "RC channel 4 value."]
24508    pub chan4_raw: u16,
24509    #[doc = "RC channel 5 value."]
24510    pub chan5_raw: u16,
24511    #[doc = "RC channel 6 value."]
24512    pub chan6_raw: u16,
24513    #[doc = "RC channel 7 value."]
24514    pub chan7_raw: u16,
24515    #[doc = "RC channel 8 value."]
24516    pub chan8_raw: u16,
24517    #[doc = "RC channel 9 value."]
24518    pub chan9_raw: u16,
24519    #[doc = "RC channel 10 value."]
24520    pub chan10_raw: u16,
24521    #[doc = "RC channel 11 value."]
24522    pub chan11_raw: u16,
24523    #[doc = "RC channel 12 value."]
24524    pub chan12_raw: u16,
24525    #[doc = "RC channel 13 value."]
24526    pub chan13_raw: u16,
24527    #[doc = "RC channel 14 value."]
24528    pub chan14_raw: u16,
24529    #[doc = "RC channel 15 value."]
24530    pub chan15_raw: u16,
24531    #[doc = "RC channel 16 value."]
24532    pub chan16_raw: u16,
24533    #[doc = "RC channel 17 value."]
24534    pub chan17_raw: u16,
24535    #[doc = "RC channel 18 value."]
24536    pub chan18_raw: u16,
24537    #[doc = "Total number of RC channels being received. This can be larger than 18, indicating that more channels are available but not given in this message. This value should be 0 when no RC channels are available."]
24538    pub chancount: u8,
24539    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
24540    pub rssi: u8,
24541}
24542impl RC_CHANNELS_DATA {
24543    pub const ENCODED_LEN: usize = 42usize;
24544    pub const DEFAULT: Self = Self {
24545        time_boot_ms: 0_u32,
24546        chan1_raw: 0_u16,
24547        chan2_raw: 0_u16,
24548        chan3_raw: 0_u16,
24549        chan4_raw: 0_u16,
24550        chan5_raw: 0_u16,
24551        chan6_raw: 0_u16,
24552        chan7_raw: 0_u16,
24553        chan8_raw: 0_u16,
24554        chan9_raw: 0_u16,
24555        chan10_raw: 0_u16,
24556        chan11_raw: 0_u16,
24557        chan12_raw: 0_u16,
24558        chan13_raw: 0_u16,
24559        chan14_raw: 0_u16,
24560        chan15_raw: 0_u16,
24561        chan16_raw: 0_u16,
24562        chan17_raw: 0_u16,
24563        chan18_raw: 0_u16,
24564        chancount: 0_u8,
24565        rssi: 0_u8,
24566    };
24567    #[cfg(feature = "arbitrary")]
24568    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24569        use arbitrary::{Arbitrary, Unstructured};
24570        let mut buf = [0u8; 1024];
24571        rng.fill_bytes(&mut buf);
24572        let mut unstructured = Unstructured::new(&buf);
24573        Self::arbitrary(&mut unstructured).unwrap_or_default()
24574    }
24575}
24576impl Default for RC_CHANNELS_DATA {
24577    fn default() -> Self {
24578        Self::DEFAULT.clone()
24579    }
24580}
24581impl MessageData for RC_CHANNELS_DATA {
24582    type Message = MavMessage;
24583    const ID: u32 = 65u32;
24584    const NAME: &'static str = "RC_CHANNELS";
24585    const EXTRA_CRC: u8 = 118u8;
24586    const ENCODED_LEN: usize = 42usize;
24587    fn deser(
24588        _version: MavlinkVersion,
24589        __input: &[u8],
24590    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24591        let avail_len = __input.len();
24592        let mut payload_buf = [0; Self::ENCODED_LEN];
24593        let mut buf = if avail_len < Self::ENCODED_LEN {
24594            payload_buf[0..avail_len].copy_from_slice(__input);
24595            Bytes::new(&payload_buf)
24596        } else {
24597            Bytes::new(__input)
24598        };
24599        let mut __struct = Self::default();
24600        __struct.time_boot_ms = buf.get_u32_le();
24601        __struct.chan1_raw = buf.get_u16_le();
24602        __struct.chan2_raw = buf.get_u16_le();
24603        __struct.chan3_raw = buf.get_u16_le();
24604        __struct.chan4_raw = buf.get_u16_le();
24605        __struct.chan5_raw = buf.get_u16_le();
24606        __struct.chan6_raw = buf.get_u16_le();
24607        __struct.chan7_raw = buf.get_u16_le();
24608        __struct.chan8_raw = buf.get_u16_le();
24609        __struct.chan9_raw = buf.get_u16_le();
24610        __struct.chan10_raw = buf.get_u16_le();
24611        __struct.chan11_raw = buf.get_u16_le();
24612        __struct.chan12_raw = buf.get_u16_le();
24613        __struct.chan13_raw = buf.get_u16_le();
24614        __struct.chan14_raw = buf.get_u16_le();
24615        __struct.chan15_raw = buf.get_u16_le();
24616        __struct.chan16_raw = buf.get_u16_le();
24617        __struct.chan17_raw = buf.get_u16_le();
24618        __struct.chan18_raw = buf.get_u16_le();
24619        __struct.chancount = buf.get_u8();
24620        __struct.rssi = buf.get_u8();
24621        Ok(__struct)
24622    }
24623    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24624        let mut __tmp = BytesMut::new(bytes);
24625        #[allow(clippy::absurd_extreme_comparisons)]
24626        #[allow(unused_comparisons)]
24627        if __tmp.remaining() < Self::ENCODED_LEN {
24628            panic!(
24629                "buffer is too small (need {} bytes, but got {})",
24630                Self::ENCODED_LEN,
24631                __tmp.remaining(),
24632            )
24633        }
24634        __tmp.put_u32_le(self.time_boot_ms);
24635        __tmp.put_u16_le(self.chan1_raw);
24636        __tmp.put_u16_le(self.chan2_raw);
24637        __tmp.put_u16_le(self.chan3_raw);
24638        __tmp.put_u16_le(self.chan4_raw);
24639        __tmp.put_u16_le(self.chan5_raw);
24640        __tmp.put_u16_le(self.chan6_raw);
24641        __tmp.put_u16_le(self.chan7_raw);
24642        __tmp.put_u16_le(self.chan8_raw);
24643        __tmp.put_u16_le(self.chan9_raw);
24644        __tmp.put_u16_le(self.chan10_raw);
24645        __tmp.put_u16_le(self.chan11_raw);
24646        __tmp.put_u16_le(self.chan12_raw);
24647        __tmp.put_u16_le(self.chan13_raw);
24648        __tmp.put_u16_le(self.chan14_raw);
24649        __tmp.put_u16_le(self.chan15_raw);
24650        __tmp.put_u16_le(self.chan16_raw);
24651        __tmp.put_u16_le(self.chan17_raw);
24652        __tmp.put_u16_le(self.chan18_raw);
24653        __tmp.put_u8(self.chancount);
24654        __tmp.put_u8(self.rssi);
24655        if matches!(version, MavlinkVersion::V2) {
24656            let len = __tmp.len();
24657            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24658        } else {
24659            __tmp.len()
24660        }
24661    }
24662}
24663#[doc = "id: 70"]
24664#[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
24665#[derive(Debug, Clone, PartialEq)]
24666#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24667#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24668pub struct RC_CHANNELS_OVERRIDE_DATA {
24669    #[doc = "RC channel 1 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
24670    pub chan1_raw: u16,
24671    #[doc = "RC channel 2 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
24672    pub chan2_raw: u16,
24673    #[doc = "RC channel 3 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
24674    pub chan3_raw: u16,
24675    #[doc = "RC channel 4 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
24676    pub chan4_raw: u16,
24677    #[doc = "RC channel 5 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
24678    pub chan5_raw: u16,
24679    #[doc = "RC channel 6 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
24680    pub chan6_raw: u16,
24681    #[doc = "RC channel 7 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
24682    pub chan7_raw: u16,
24683    #[doc = "RC channel 8 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
24684    pub chan8_raw: u16,
24685    #[doc = "System ID"]
24686    pub target_system: u8,
24687    #[doc = "Component ID"]
24688    pub target_component: u8,
24689    #[doc = "RC channel 9 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
24690    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24691    pub chan9_raw: u16,
24692    #[doc = "RC channel 10 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
24693    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24694    pub chan10_raw: u16,
24695    #[doc = "RC channel 11 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
24696    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24697    pub chan11_raw: u16,
24698    #[doc = "RC channel 12 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
24699    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24700    pub chan12_raw: u16,
24701    #[doc = "RC channel 13 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
24702    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24703    pub chan13_raw: u16,
24704    #[doc = "RC channel 14 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
24705    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24706    pub chan14_raw: u16,
24707    #[doc = "RC channel 15 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
24708    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24709    pub chan15_raw: u16,
24710    #[doc = "RC channel 16 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
24711    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24712    pub chan16_raw: u16,
24713    #[doc = "RC channel 17 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
24714    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24715    pub chan17_raw: u16,
24716    #[doc = "RC channel 18 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
24717    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24718    pub chan18_raw: u16,
24719}
24720impl RC_CHANNELS_OVERRIDE_DATA {
24721    pub const ENCODED_LEN: usize = 38usize;
24722    pub const DEFAULT: Self = Self {
24723        chan1_raw: 0_u16,
24724        chan2_raw: 0_u16,
24725        chan3_raw: 0_u16,
24726        chan4_raw: 0_u16,
24727        chan5_raw: 0_u16,
24728        chan6_raw: 0_u16,
24729        chan7_raw: 0_u16,
24730        chan8_raw: 0_u16,
24731        target_system: 0_u8,
24732        target_component: 0_u8,
24733        chan9_raw: 0_u16,
24734        chan10_raw: 0_u16,
24735        chan11_raw: 0_u16,
24736        chan12_raw: 0_u16,
24737        chan13_raw: 0_u16,
24738        chan14_raw: 0_u16,
24739        chan15_raw: 0_u16,
24740        chan16_raw: 0_u16,
24741        chan17_raw: 0_u16,
24742        chan18_raw: 0_u16,
24743    };
24744    #[cfg(feature = "arbitrary")]
24745    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24746        use arbitrary::{Arbitrary, Unstructured};
24747        let mut buf = [0u8; 1024];
24748        rng.fill_bytes(&mut buf);
24749        let mut unstructured = Unstructured::new(&buf);
24750        Self::arbitrary(&mut unstructured).unwrap_or_default()
24751    }
24752}
24753impl Default for RC_CHANNELS_OVERRIDE_DATA {
24754    fn default() -> Self {
24755        Self::DEFAULT.clone()
24756    }
24757}
24758impl MessageData for RC_CHANNELS_OVERRIDE_DATA {
24759    type Message = MavMessage;
24760    const ID: u32 = 70u32;
24761    const NAME: &'static str = "RC_CHANNELS_OVERRIDE";
24762    const EXTRA_CRC: u8 = 124u8;
24763    const ENCODED_LEN: usize = 38usize;
24764    fn deser(
24765        _version: MavlinkVersion,
24766        __input: &[u8],
24767    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24768        let avail_len = __input.len();
24769        let mut payload_buf = [0; Self::ENCODED_LEN];
24770        let mut buf = if avail_len < Self::ENCODED_LEN {
24771            payload_buf[0..avail_len].copy_from_slice(__input);
24772            Bytes::new(&payload_buf)
24773        } else {
24774            Bytes::new(__input)
24775        };
24776        let mut __struct = Self::default();
24777        __struct.chan1_raw = buf.get_u16_le();
24778        __struct.chan2_raw = buf.get_u16_le();
24779        __struct.chan3_raw = buf.get_u16_le();
24780        __struct.chan4_raw = buf.get_u16_le();
24781        __struct.chan5_raw = buf.get_u16_le();
24782        __struct.chan6_raw = buf.get_u16_le();
24783        __struct.chan7_raw = buf.get_u16_le();
24784        __struct.chan8_raw = buf.get_u16_le();
24785        __struct.target_system = buf.get_u8();
24786        __struct.target_component = buf.get_u8();
24787        __struct.chan9_raw = buf.get_u16_le();
24788        __struct.chan10_raw = buf.get_u16_le();
24789        __struct.chan11_raw = buf.get_u16_le();
24790        __struct.chan12_raw = buf.get_u16_le();
24791        __struct.chan13_raw = buf.get_u16_le();
24792        __struct.chan14_raw = buf.get_u16_le();
24793        __struct.chan15_raw = buf.get_u16_le();
24794        __struct.chan16_raw = buf.get_u16_le();
24795        __struct.chan17_raw = buf.get_u16_le();
24796        __struct.chan18_raw = buf.get_u16_le();
24797        Ok(__struct)
24798    }
24799    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24800        let mut __tmp = BytesMut::new(bytes);
24801        #[allow(clippy::absurd_extreme_comparisons)]
24802        #[allow(unused_comparisons)]
24803        if __tmp.remaining() < Self::ENCODED_LEN {
24804            panic!(
24805                "buffer is too small (need {} bytes, but got {})",
24806                Self::ENCODED_LEN,
24807                __tmp.remaining(),
24808            )
24809        }
24810        __tmp.put_u16_le(self.chan1_raw);
24811        __tmp.put_u16_le(self.chan2_raw);
24812        __tmp.put_u16_le(self.chan3_raw);
24813        __tmp.put_u16_le(self.chan4_raw);
24814        __tmp.put_u16_le(self.chan5_raw);
24815        __tmp.put_u16_le(self.chan6_raw);
24816        __tmp.put_u16_le(self.chan7_raw);
24817        __tmp.put_u16_le(self.chan8_raw);
24818        __tmp.put_u8(self.target_system);
24819        __tmp.put_u8(self.target_component);
24820        __tmp.put_u16_le(self.chan9_raw);
24821        __tmp.put_u16_le(self.chan10_raw);
24822        __tmp.put_u16_le(self.chan11_raw);
24823        __tmp.put_u16_le(self.chan12_raw);
24824        __tmp.put_u16_le(self.chan13_raw);
24825        __tmp.put_u16_le(self.chan14_raw);
24826        __tmp.put_u16_le(self.chan15_raw);
24827        __tmp.put_u16_le(self.chan16_raw);
24828        __tmp.put_u16_le(self.chan17_raw);
24829        __tmp.put_u16_le(self.chan18_raw);
24830        if matches!(version, MavlinkVersion::V2) {
24831            let len = __tmp.len();
24832            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24833        } else {
24834            __tmp.len()
24835        }
24836    }
24837}
24838#[doc = "id: 35"]
24839#[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
24840#[derive(Debug, Clone, PartialEq)]
24841#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24842#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24843pub struct RC_CHANNELS_RAW_DATA {
24844    #[doc = "Timestamp (time since system boot)."]
24845    pub time_boot_ms: u32,
24846    #[doc = "RC channel 1 value."]
24847    pub chan1_raw: u16,
24848    #[doc = "RC channel 2 value."]
24849    pub chan2_raw: u16,
24850    #[doc = "RC channel 3 value."]
24851    pub chan3_raw: u16,
24852    #[doc = "RC channel 4 value."]
24853    pub chan4_raw: u16,
24854    #[doc = "RC channel 5 value."]
24855    pub chan5_raw: u16,
24856    #[doc = "RC channel 6 value."]
24857    pub chan6_raw: u16,
24858    #[doc = "RC channel 7 value."]
24859    pub chan7_raw: u16,
24860    #[doc = "RC channel 8 value."]
24861    pub chan8_raw: u16,
24862    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
24863    pub port: u8,
24864    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
24865    pub rssi: u8,
24866}
24867impl RC_CHANNELS_RAW_DATA {
24868    pub const ENCODED_LEN: usize = 22usize;
24869    pub const DEFAULT: Self = Self {
24870        time_boot_ms: 0_u32,
24871        chan1_raw: 0_u16,
24872        chan2_raw: 0_u16,
24873        chan3_raw: 0_u16,
24874        chan4_raw: 0_u16,
24875        chan5_raw: 0_u16,
24876        chan6_raw: 0_u16,
24877        chan7_raw: 0_u16,
24878        chan8_raw: 0_u16,
24879        port: 0_u8,
24880        rssi: 0_u8,
24881    };
24882    #[cfg(feature = "arbitrary")]
24883    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24884        use arbitrary::{Arbitrary, Unstructured};
24885        let mut buf = [0u8; 1024];
24886        rng.fill_bytes(&mut buf);
24887        let mut unstructured = Unstructured::new(&buf);
24888        Self::arbitrary(&mut unstructured).unwrap_or_default()
24889    }
24890}
24891impl Default for RC_CHANNELS_RAW_DATA {
24892    fn default() -> Self {
24893        Self::DEFAULT.clone()
24894    }
24895}
24896impl MessageData for RC_CHANNELS_RAW_DATA {
24897    type Message = MavMessage;
24898    const ID: u32 = 35u32;
24899    const NAME: &'static str = "RC_CHANNELS_RAW";
24900    const EXTRA_CRC: u8 = 244u8;
24901    const ENCODED_LEN: usize = 22usize;
24902    fn deser(
24903        _version: MavlinkVersion,
24904        __input: &[u8],
24905    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24906        let avail_len = __input.len();
24907        let mut payload_buf = [0; Self::ENCODED_LEN];
24908        let mut buf = if avail_len < Self::ENCODED_LEN {
24909            payload_buf[0..avail_len].copy_from_slice(__input);
24910            Bytes::new(&payload_buf)
24911        } else {
24912            Bytes::new(__input)
24913        };
24914        let mut __struct = Self::default();
24915        __struct.time_boot_ms = buf.get_u32_le();
24916        __struct.chan1_raw = buf.get_u16_le();
24917        __struct.chan2_raw = buf.get_u16_le();
24918        __struct.chan3_raw = buf.get_u16_le();
24919        __struct.chan4_raw = buf.get_u16_le();
24920        __struct.chan5_raw = buf.get_u16_le();
24921        __struct.chan6_raw = buf.get_u16_le();
24922        __struct.chan7_raw = buf.get_u16_le();
24923        __struct.chan8_raw = buf.get_u16_le();
24924        __struct.port = buf.get_u8();
24925        __struct.rssi = buf.get_u8();
24926        Ok(__struct)
24927    }
24928    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24929        let mut __tmp = BytesMut::new(bytes);
24930        #[allow(clippy::absurd_extreme_comparisons)]
24931        #[allow(unused_comparisons)]
24932        if __tmp.remaining() < Self::ENCODED_LEN {
24933            panic!(
24934                "buffer is too small (need {} bytes, but got {})",
24935                Self::ENCODED_LEN,
24936                __tmp.remaining(),
24937            )
24938        }
24939        __tmp.put_u32_le(self.time_boot_ms);
24940        __tmp.put_u16_le(self.chan1_raw);
24941        __tmp.put_u16_le(self.chan2_raw);
24942        __tmp.put_u16_le(self.chan3_raw);
24943        __tmp.put_u16_le(self.chan4_raw);
24944        __tmp.put_u16_le(self.chan5_raw);
24945        __tmp.put_u16_le(self.chan6_raw);
24946        __tmp.put_u16_le(self.chan7_raw);
24947        __tmp.put_u16_le(self.chan8_raw);
24948        __tmp.put_u8(self.port);
24949        __tmp.put_u8(self.rssi);
24950        if matches!(version, MavlinkVersion::V2) {
24951            let len = __tmp.len();
24952            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24953        } else {
24954            __tmp.len()
24955        }
24956    }
24957}
24958#[doc = "id: 34"]
24959#[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
24960#[derive(Debug, Clone, PartialEq)]
24961#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24962#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24963pub struct RC_CHANNELS_SCALED_DATA {
24964    #[doc = "Timestamp (time since system boot)."]
24965    pub time_boot_ms: u32,
24966    #[doc = "RC channel 1 value scaled."]
24967    pub chan1_scaled: i16,
24968    #[doc = "RC channel 2 value scaled."]
24969    pub chan2_scaled: i16,
24970    #[doc = "RC channel 3 value scaled."]
24971    pub chan3_scaled: i16,
24972    #[doc = "RC channel 4 value scaled."]
24973    pub chan4_scaled: i16,
24974    #[doc = "RC channel 5 value scaled."]
24975    pub chan5_scaled: i16,
24976    #[doc = "RC channel 6 value scaled."]
24977    pub chan6_scaled: i16,
24978    #[doc = "RC channel 7 value scaled."]
24979    pub chan7_scaled: i16,
24980    #[doc = "RC channel 8 value scaled."]
24981    pub chan8_scaled: i16,
24982    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
24983    pub port: u8,
24984    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
24985    pub rssi: u8,
24986}
24987impl RC_CHANNELS_SCALED_DATA {
24988    pub const ENCODED_LEN: usize = 22usize;
24989    pub const DEFAULT: Self = Self {
24990        time_boot_ms: 0_u32,
24991        chan1_scaled: 0_i16,
24992        chan2_scaled: 0_i16,
24993        chan3_scaled: 0_i16,
24994        chan4_scaled: 0_i16,
24995        chan5_scaled: 0_i16,
24996        chan6_scaled: 0_i16,
24997        chan7_scaled: 0_i16,
24998        chan8_scaled: 0_i16,
24999        port: 0_u8,
25000        rssi: 0_u8,
25001    };
25002    #[cfg(feature = "arbitrary")]
25003    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25004        use arbitrary::{Arbitrary, Unstructured};
25005        let mut buf = [0u8; 1024];
25006        rng.fill_bytes(&mut buf);
25007        let mut unstructured = Unstructured::new(&buf);
25008        Self::arbitrary(&mut unstructured).unwrap_or_default()
25009    }
25010}
25011impl Default for RC_CHANNELS_SCALED_DATA {
25012    fn default() -> Self {
25013        Self::DEFAULT.clone()
25014    }
25015}
25016impl MessageData for RC_CHANNELS_SCALED_DATA {
25017    type Message = MavMessage;
25018    const ID: u32 = 34u32;
25019    const NAME: &'static str = "RC_CHANNELS_SCALED";
25020    const EXTRA_CRC: u8 = 237u8;
25021    const ENCODED_LEN: usize = 22usize;
25022    fn deser(
25023        _version: MavlinkVersion,
25024        __input: &[u8],
25025    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25026        let avail_len = __input.len();
25027        let mut payload_buf = [0; Self::ENCODED_LEN];
25028        let mut buf = if avail_len < Self::ENCODED_LEN {
25029            payload_buf[0..avail_len].copy_from_slice(__input);
25030            Bytes::new(&payload_buf)
25031        } else {
25032            Bytes::new(__input)
25033        };
25034        let mut __struct = Self::default();
25035        __struct.time_boot_ms = buf.get_u32_le();
25036        __struct.chan1_scaled = buf.get_i16_le();
25037        __struct.chan2_scaled = buf.get_i16_le();
25038        __struct.chan3_scaled = buf.get_i16_le();
25039        __struct.chan4_scaled = buf.get_i16_le();
25040        __struct.chan5_scaled = buf.get_i16_le();
25041        __struct.chan6_scaled = buf.get_i16_le();
25042        __struct.chan7_scaled = buf.get_i16_le();
25043        __struct.chan8_scaled = buf.get_i16_le();
25044        __struct.port = buf.get_u8();
25045        __struct.rssi = buf.get_u8();
25046        Ok(__struct)
25047    }
25048    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25049        let mut __tmp = BytesMut::new(bytes);
25050        #[allow(clippy::absurd_extreme_comparisons)]
25051        #[allow(unused_comparisons)]
25052        if __tmp.remaining() < Self::ENCODED_LEN {
25053            panic!(
25054                "buffer is too small (need {} bytes, but got {})",
25055                Self::ENCODED_LEN,
25056                __tmp.remaining(),
25057            )
25058        }
25059        __tmp.put_u32_le(self.time_boot_ms);
25060        __tmp.put_i16_le(self.chan1_scaled);
25061        __tmp.put_i16_le(self.chan2_scaled);
25062        __tmp.put_i16_le(self.chan3_scaled);
25063        __tmp.put_i16_le(self.chan4_scaled);
25064        __tmp.put_i16_le(self.chan5_scaled);
25065        __tmp.put_i16_le(self.chan6_scaled);
25066        __tmp.put_i16_le(self.chan7_scaled);
25067        __tmp.put_i16_le(self.chan8_scaled);
25068        __tmp.put_u8(self.port);
25069        __tmp.put_u8(self.rssi);
25070        if matches!(version, MavlinkVersion::V2) {
25071            let len = __tmp.len();
25072            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25073        } else {
25074            __tmp.len()
25075        }
25076    }
25077}
25078#[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
25079#[doc = "id: 66"]
25080#[doc = "Request a data stream."]
25081#[derive(Debug, Clone, PartialEq)]
25082#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25083#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25084pub struct REQUEST_DATA_STREAM_DATA {
25085    #[doc = "The requested message rate"]
25086    pub req_message_rate: u16,
25087    #[doc = "The target requested to send the message stream."]
25088    pub target_system: u8,
25089    #[doc = "The target requested to send the message stream."]
25090    pub target_component: u8,
25091    #[doc = "The ID of the requested data stream"]
25092    pub req_stream_id: u8,
25093    #[doc = "1 to start sending, 0 to stop sending."]
25094    pub start_stop: u8,
25095}
25096impl REQUEST_DATA_STREAM_DATA {
25097    pub const ENCODED_LEN: usize = 6usize;
25098    pub const DEFAULT: Self = Self {
25099        req_message_rate: 0_u16,
25100        target_system: 0_u8,
25101        target_component: 0_u8,
25102        req_stream_id: 0_u8,
25103        start_stop: 0_u8,
25104    };
25105    #[cfg(feature = "arbitrary")]
25106    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25107        use arbitrary::{Arbitrary, Unstructured};
25108        let mut buf = [0u8; 1024];
25109        rng.fill_bytes(&mut buf);
25110        let mut unstructured = Unstructured::new(&buf);
25111        Self::arbitrary(&mut unstructured).unwrap_or_default()
25112    }
25113}
25114impl Default for REQUEST_DATA_STREAM_DATA {
25115    fn default() -> Self {
25116        Self::DEFAULT.clone()
25117    }
25118}
25119impl MessageData for REQUEST_DATA_STREAM_DATA {
25120    type Message = MavMessage;
25121    const ID: u32 = 66u32;
25122    const NAME: &'static str = "REQUEST_DATA_STREAM";
25123    const EXTRA_CRC: u8 = 148u8;
25124    const ENCODED_LEN: usize = 6usize;
25125    fn deser(
25126        _version: MavlinkVersion,
25127        __input: &[u8],
25128    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25129        let avail_len = __input.len();
25130        let mut payload_buf = [0; Self::ENCODED_LEN];
25131        let mut buf = if avail_len < Self::ENCODED_LEN {
25132            payload_buf[0..avail_len].copy_from_slice(__input);
25133            Bytes::new(&payload_buf)
25134        } else {
25135            Bytes::new(__input)
25136        };
25137        let mut __struct = Self::default();
25138        __struct.req_message_rate = buf.get_u16_le();
25139        __struct.target_system = buf.get_u8();
25140        __struct.target_component = buf.get_u8();
25141        __struct.req_stream_id = buf.get_u8();
25142        __struct.start_stop = buf.get_u8();
25143        Ok(__struct)
25144    }
25145    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25146        let mut __tmp = BytesMut::new(bytes);
25147        #[allow(clippy::absurd_extreme_comparisons)]
25148        #[allow(unused_comparisons)]
25149        if __tmp.remaining() < Self::ENCODED_LEN {
25150            panic!(
25151                "buffer is too small (need {} bytes, but got {})",
25152                Self::ENCODED_LEN,
25153                __tmp.remaining(),
25154            )
25155        }
25156        __tmp.put_u16_le(self.req_message_rate);
25157        __tmp.put_u8(self.target_system);
25158        __tmp.put_u8(self.target_component);
25159        __tmp.put_u8(self.req_stream_id);
25160        __tmp.put_u8(self.start_stop);
25161        if matches!(version, MavlinkVersion::V2) {
25162            let len = __tmp.len();
25163            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25164        } else {
25165            __tmp.len()
25166        }
25167    }
25168}
25169#[doc = "id: 412"]
25170#[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
25171#[derive(Debug, Clone, PartialEq)]
25172#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25173#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25174pub struct REQUEST_EVENT_DATA {
25175    #[doc = "First sequence number of the requested event."]
25176    pub first_sequence: u16,
25177    #[doc = "Last sequence number of the requested event."]
25178    pub last_sequence: u16,
25179    #[doc = "System ID"]
25180    pub target_system: u8,
25181    #[doc = "Component ID"]
25182    pub target_component: u8,
25183}
25184impl REQUEST_EVENT_DATA {
25185    pub const ENCODED_LEN: usize = 6usize;
25186    pub const DEFAULT: Self = Self {
25187        first_sequence: 0_u16,
25188        last_sequence: 0_u16,
25189        target_system: 0_u8,
25190        target_component: 0_u8,
25191    };
25192    #[cfg(feature = "arbitrary")]
25193    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25194        use arbitrary::{Arbitrary, Unstructured};
25195        let mut buf = [0u8; 1024];
25196        rng.fill_bytes(&mut buf);
25197        let mut unstructured = Unstructured::new(&buf);
25198        Self::arbitrary(&mut unstructured).unwrap_or_default()
25199    }
25200}
25201impl Default for REQUEST_EVENT_DATA {
25202    fn default() -> Self {
25203        Self::DEFAULT.clone()
25204    }
25205}
25206impl MessageData for REQUEST_EVENT_DATA {
25207    type Message = MavMessage;
25208    const ID: u32 = 412u32;
25209    const NAME: &'static str = "REQUEST_EVENT";
25210    const EXTRA_CRC: u8 = 33u8;
25211    const ENCODED_LEN: usize = 6usize;
25212    fn deser(
25213        _version: MavlinkVersion,
25214        __input: &[u8],
25215    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25216        let avail_len = __input.len();
25217        let mut payload_buf = [0; Self::ENCODED_LEN];
25218        let mut buf = if avail_len < Self::ENCODED_LEN {
25219            payload_buf[0..avail_len].copy_from_slice(__input);
25220            Bytes::new(&payload_buf)
25221        } else {
25222            Bytes::new(__input)
25223        };
25224        let mut __struct = Self::default();
25225        __struct.first_sequence = buf.get_u16_le();
25226        __struct.last_sequence = buf.get_u16_le();
25227        __struct.target_system = buf.get_u8();
25228        __struct.target_component = buf.get_u8();
25229        Ok(__struct)
25230    }
25231    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25232        let mut __tmp = BytesMut::new(bytes);
25233        #[allow(clippy::absurd_extreme_comparisons)]
25234        #[allow(unused_comparisons)]
25235        if __tmp.remaining() < Self::ENCODED_LEN {
25236            panic!(
25237                "buffer is too small (need {} bytes, but got {})",
25238                Self::ENCODED_LEN,
25239                __tmp.remaining(),
25240            )
25241        }
25242        __tmp.put_u16_le(self.first_sequence);
25243        __tmp.put_u16_le(self.last_sequence);
25244        __tmp.put_u8(self.target_system);
25245        __tmp.put_u8(self.target_component);
25246        if matches!(version, MavlinkVersion::V2) {
25247            let len = __tmp.len();
25248            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25249        } else {
25250            __tmp.len()
25251        }
25252    }
25253}
25254#[doc = "id: 142"]
25255#[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
25256#[derive(Debug, Clone, PartialEq)]
25257#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25258#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25259pub struct RESOURCE_REQUEST_DATA {
25260    #[doc = "Request ID. This ID should be re-used when sending back URI contents"]
25261    pub request_id: u8,
25262    #[doc = "The type of requested URI. 0 = a file via URL. 1 = a UAVCAN binary"]
25263    pub uri_type: u8,
25264    #[doc = "The requested unique resource identifier (URI). It is not necessarily a straight domain name (depends on the URI type enum)"]
25265    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25266    pub uri: [u8; 120],
25267    #[doc = "The way the autopilot wants to receive the URI. 0 = MAVLink FTP. 1 = binary stream."]
25268    pub transfer_type: u8,
25269    #[doc = "The storage path the autopilot wants the URI to be stored in. Will only be valid if the transfer_type has a storage associated (e.g. MAVLink FTP)."]
25270    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25271    pub storage: [u8; 120],
25272}
25273impl RESOURCE_REQUEST_DATA {
25274    pub const ENCODED_LEN: usize = 243usize;
25275    pub const DEFAULT: Self = Self {
25276        request_id: 0_u8,
25277        uri_type: 0_u8,
25278        uri: [0_u8; 120usize],
25279        transfer_type: 0_u8,
25280        storage: [0_u8; 120usize],
25281    };
25282    #[cfg(feature = "arbitrary")]
25283    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25284        use arbitrary::{Arbitrary, Unstructured};
25285        let mut buf = [0u8; 1024];
25286        rng.fill_bytes(&mut buf);
25287        let mut unstructured = Unstructured::new(&buf);
25288        Self::arbitrary(&mut unstructured).unwrap_or_default()
25289    }
25290}
25291impl Default for RESOURCE_REQUEST_DATA {
25292    fn default() -> Self {
25293        Self::DEFAULT.clone()
25294    }
25295}
25296impl MessageData for RESOURCE_REQUEST_DATA {
25297    type Message = MavMessage;
25298    const ID: u32 = 142u32;
25299    const NAME: &'static str = "RESOURCE_REQUEST";
25300    const EXTRA_CRC: u8 = 72u8;
25301    const ENCODED_LEN: usize = 243usize;
25302    fn deser(
25303        _version: MavlinkVersion,
25304        __input: &[u8],
25305    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25306        let avail_len = __input.len();
25307        let mut payload_buf = [0; Self::ENCODED_LEN];
25308        let mut buf = if avail_len < Self::ENCODED_LEN {
25309            payload_buf[0..avail_len].copy_from_slice(__input);
25310            Bytes::new(&payload_buf)
25311        } else {
25312            Bytes::new(__input)
25313        };
25314        let mut __struct = Self::default();
25315        __struct.request_id = buf.get_u8();
25316        __struct.uri_type = buf.get_u8();
25317        for v in &mut __struct.uri {
25318            let val = buf.get_u8();
25319            *v = val;
25320        }
25321        __struct.transfer_type = buf.get_u8();
25322        for v in &mut __struct.storage {
25323            let val = buf.get_u8();
25324            *v = val;
25325        }
25326        Ok(__struct)
25327    }
25328    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25329        let mut __tmp = BytesMut::new(bytes);
25330        #[allow(clippy::absurd_extreme_comparisons)]
25331        #[allow(unused_comparisons)]
25332        if __tmp.remaining() < Self::ENCODED_LEN {
25333            panic!(
25334                "buffer is too small (need {} bytes, but got {})",
25335                Self::ENCODED_LEN,
25336                __tmp.remaining(),
25337            )
25338        }
25339        __tmp.put_u8(self.request_id);
25340        __tmp.put_u8(self.uri_type);
25341        for val in &self.uri {
25342            __tmp.put_u8(*val);
25343        }
25344        __tmp.put_u8(self.transfer_type);
25345        for val in &self.storage {
25346            __tmp.put_u8(*val);
25347        }
25348        if matches!(version, MavlinkVersion::V2) {
25349            let len = __tmp.len();
25350            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25351        } else {
25352            __tmp.len()
25353        }
25354    }
25355}
25356#[doc = "id: 413"]
25357#[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
25358#[derive(Debug, Clone, PartialEq)]
25359#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25360#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25361pub struct RESPONSE_EVENT_ERROR_DATA {
25362    #[doc = "Sequence number."]
25363    pub sequence: u16,
25364    #[doc = "Oldest Sequence number that is still available after the sequence set in REQUEST_EVENT."]
25365    pub sequence_oldest_available: u16,
25366    #[doc = "System ID"]
25367    pub target_system: u8,
25368    #[doc = "Component ID"]
25369    pub target_component: u8,
25370    #[doc = "Error reason."]
25371    pub reason: MavEventErrorReason,
25372}
25373impl RESPONSE_EVENT_ERROR_DATA {
25374    pub const ENCODED_LEN: usize = 7usize;
25375    pub const DEFAULT: Self = Self {
25376        sequence: 0_u16,
25377        sequence_oldest_available: 0_u16,
25378        target_system: 0_u8,
25379        target_component: 0_u8,
25380        reason: MavEventErrorReason::DEFAULT,
25381    };
25382    #[cfg(feature = "arbitrary")]
25383    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25384        use arbitrary::{Arbitrary, Unstructured};
25385        let mut buf = [0u8; 1024];
25386        rng.fill_bytes(&mut buf);
25387        let mut unstructured = Unstructured::new(&buf);
25388        Self::arbitrary(&mut unstructured).unwrap_or_default()
25389    }
25390}
25391impl Default for RESPONSE_EVENT_ERROR_DATA {
25392    fn default() -> Self {
25393        Self::DEFAULT.clone()
25394    }
25395}
25396impl MessageData for RESPONSE_EVENT_ERROR_DATA {
25397    type Message = MavMessage;
25398    const ID: u32 = 413u32;
25399    const NAME: &'static str = "RESPONSE_EVENT_ERROR";
25400    const EXTRA_CRC: u8 = 77u8;
25401    const ENCODED_LEN: usize = 7usize;
25402    fn deser(
25403        _version: MavlinkVersion,
25404        __input: &[u8],
25405    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25406        let avail_len = __input.len();
25407        let mut payload_buf = [0; Self::ENCODED_LEN];
25408        let mut buf = if avail_len < Self::ENCODED_LEN {
25409            payload_buf[0..avail_len].copy_from_slice(__input);
25410            Bytes::new(&payload_buf)
25411        } else {
25412            Bytes::new(__input)
25413        };
25414        let mut __struct = Self::default();
25415        __struct.sequence = buf.get_u16_le();
25416        __struct.sequence_oldest_available = buf.get_u16_le();
25417        __struct.target_system = buf.get_u8();
25418        __struct.target_component = buf.get_u8();
25419        let tmp = buf.get_u8();
25420        __struct.reason =
25421            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25422                enum_type: "MavEventErrorReason",
25423                value: tmp as u32,
25424            })?;
25425        Ok(__struct)
25426    }
25427    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25428        let mut __tmp = BytesMut::new(bytes);
25429        #[allow(clippy::absurd_extreme_comparisons)]
25430        #[allow(unused_comparisons)]
25431        if __tmp.remaining() < Self::ENCODED_LEN {
25432            panic!(
25433                "buffer is too small (need {} bytes, but got {})",
25434                Self::ENCODED_LEN,
25435                __tmp.remaining(),
25436            )
25437        }
25438        __tmp.put_u16_le(self.sequence);
25439        __tmp.put_u16_le(self.sequence_oldest_available);
25440        __tmp.put_u8(self.target_system);
25441        __tmp.put_u8(self.target_component);
25442        __tmp.put_u8(self.reason as u8);
25443        if matches!(version, MavlinkVersion::V2) {
25444            let len = __tmp.len();
25445            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25446        } else {
25447            __tmp.len()
25448        }
25449    }
25450}
25451#[doc = "id: 55"]
25452#[doc = "Read out the safety zone the MAV currently assumes."]
25453#[derive(Debug, Clone, PartialEq)]
25454#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25455#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25456pub struct SAFETY_ALLOWED_AREA_DATA {
25457    #[doc = "x position 1 / Latitude 1"]
25458    pub p1x: f32,
25459    #[doc = "y position 1 / Longitude 1"]
25460    pub p1y: f32,
25461    #[doc = "z position 1 / Altitude 1"]
25462    pub p1z: f32,
25463    #[doc = "x position 2 / Latitude 2"]
25464    pub p2x: f32,
25465    #[doc = "y position 2 / Longitude 2"]
25466    pub p2y: f32,
25467    #[doc = "z position 2 / Altitude 2"]
25468    pub p2z: f32,
25469    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
25470    pub frame: MavFrame,
25471}
25472impl SAFETY_ALLOWED_AREA_DATA {
25473    pub const ENCODED_LEN: usize = 25usize;
25474    pub const DEFAULT: Self = Self {
25475        p1x: 0.0_f32,
25476        p1y: 0.0_f32,
25477        p1z: 0.0_f32,
25478        p2x: 0.0_f32,
25479        p2y: 0.0_f32,
25480        p2z: 0.0_f32,
25481        frame: MavFrame::DEFAULT,
25482    };
25483    #[cfg(feature = "arbitrary")]
25484    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25485        use arbitrary::{Arbitrary, Unstructured};
25486        let mut buf = [0u8; 1024];
25487        rng.fill_bytes(&mut buf);
25488        let mut unstructured = Unstructured::new(&buf);
25489        Self::arbitrary(&mut unstructured).unwrap_or_default()
25490    }
25491}
25492impl Default for SAFETY_ALLOWED_AREA_DATA {
25493    fn default() -> Self {
25494        Self::DEFAULT.clone()
25495    }
25496}
25497impl MessageData for SAFETY_ALLOWED_AREA_DATA {
25498    type Message = MavMessage;
25499    const ID: u32 = 55u32;
25500    const NAME: &'static str = "SAFETY_ALLOWED_AREA";
25501    const EXTRA_CRC: u8 = 3u8;
25502    const ENCODED_LEN: usize = 25usize;
25503    fn deser(
25504        _version: MavlinkVersion,
25505        __input: &[u8],
25506    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25507        let avail_len = __input.len();
25508        let mut payload_buf = [0; Self::ENCODED_LEN];
25509        let mut buf = if avail_len < Self::ENCODED_LEN {
25510            payload_buf[0..avail_len].copy_from_slice(__input);
25511            Bytes::new(&payload_buf)
25512        } else {
25513            Bytes::new(__input)
25514        };
25515        let mut __struct = Self::default();
25516        __struct.p1x = buf.get_f32_le();
25517        __struct.p1y = buf.get_f32_le();
25518        __struct.p1z = buf.get_f32_le();
25519        __struct.p2x = buf.get_f32_le();
25520        __struct.p2y = buf.get_f32_le();
25521        __struct.p2z = buf.get_f32_le();
25522        let tmp = buf.get_u8();
25523        __struct.frame =
25524            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25525                enum_type: "MavFrame",
25526                value: tmp as u32,
25527            })?;
25528        Ok(__struct)
25529    }
25530    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25531        let mut __tmp = BytesMut::new(bytes);
25532        #[allow(clippy::absurd_extreme_comparisons)]
25533        #[allow(unused_comparisons)]
25534        if __tmp.remaining() < Self::ENCODED_LEN {
25535            panic!(
25536                "buffer is too small (need {} bytes, but got {})",
25537                Self::ENCODED_LEN,
25538                __tmp.remaining(),
25539            )
25540        }
25541        __tmp.put_f32_le(self.p1x);
25542        __tmp.put_f32_le(self.p1y);
25543        __tmp.put_f32_le(self.p1z);
25544        __tmp.put_f32_le(self.p2x);
25545        __tmp.put_f32_le(self.p2y);
25546        __tmp.put_f32_le(self.p2z);
25547        __tmp.put_u8(self.frame as u8);
25548        if matches!(version, MavlinkVersion::V2) {
25549            let len = __tmp.len();
25550            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25551        } else {
25552            __tmp.len()
25553        }
25554    }
25555}
25556#[doc = "id: 54"]
25557#[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
25558#[derive(Debug, Clone, PartialEq)]
25559#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25560#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25561pub struct SAFETY_SET_ALLOWED_AREA_DATA {
25562    #[doc = "x position 1 / Latitude 1"]
25563    pub p1x: f32,
25564    #[doc = "y position 1 / Longitude 1"]
25565    pub p1y: f32,
25566    #[doc = "z position 1 / Altitude 1"]
25567    pub p1z: f32,
25568    #[doc = "x position 2 / Latitude 2"]
25569    pub p2x: f32,
25570    #[doc = "y position 2 / Longitude 2"]
25571    pub p2y: f32,
25572    #[doc = "z position 2 / Altitude 2"]
25573    pub p2z: f32,
25574    #[doc = "System ID"]
25575    pub target_system: u8,
25576    #[doc = "Component ID"]
25577    pub target_component: u8,
25578    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
25579    pub frame: MavFrame,
25580}
25581impl SAFETY_SET_ALLOWED_AREA_DATA {
25582    pub const ENCODED_LEN: usize = 27usize;
25583    pub const DEFAULT: Self = Self {
25584        p1x: 0.0_f32,
25585        p1y: 0.0_f32,
25586        p1z: 0.0_f32,
25587        p2x: 0.0_f32,
25588        p2y: 0.0_f32,
25589        p2z: 0.0_f32,
25590        target_system: 0_u8,
25591        target_component: 0_u8,
25592        frame: MavFrame::DEFAULT,
25593    };
25594    #[cfg(feature = "arbitrary")]
25595    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25596        use arbitrary::{Arbitrary, Unstructured};
25597        let mut buf = [0u8; 1024];
25598        rng.fill_bytes(&mut buf);
25599        let mut unstructured = Unstructured::new(&buf);
25600        Self::arbitrary(&mut unstructured).unwrap_or_default()
25601    }
25602}
25603impl Default for SAFETY_SET_ALLOWED_AREA_DATA {
25604    fn default() -> Self {
25605        Self::DEFAULT.clone()
25606    }
25607}
25608impl MessageData for SAFETY_SET_ALLOWED_AREA_DATA {
25609    type Message = MavMessage;
25610    const ID: u32 = 54u32;
25611    const NAME: &'static str = "SAFETY_SET_ALLOWED_AREA";
25612    const EXTRA_CRC: u8 = 15u8;
25613    const ENCODED_LEN: usize = 27usize;
25614    fn deser(
25615        _version: MavlinkVersion,
25616        __input: &[u8],
25617    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25618        let avail_len = __input.len();
25619        let mut payload_buf = [0; Self::ENCODED_LEN];
25620        let mut buf = if avail_len < Self::ENCODED_LEN {
25621            payload_buf[0..avail_len].copy_from_slice(__input);
25622            Bytes::new(&payload_buf)
25623        } else {
25624            Bytes::new(__input)
25625        };
25626        let mut __struct = Self::default();
25627        __struct.p1x = buf.get_f32_le();
25628        __struct.p1y = buf.get_f32_le();
25629        __struct.p1z = buf.get_f32_le();
25630        __struct.p2x = buf.get_f32_le();
25631        __struct.p2y = buf.get_f32_le();
25632        __struct.p2z = buf.get_f32_le();
25633        __struct.target_system = buf.get_u8();
25634        __struct.target_component = buf.get_u8();
25635        let tmp = buf.get_u8();
25636        __struct.frame =
25637            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25638                enum_type: "MavFrame",
25639                value: tmp as u32,
25640            })?;
25641        Ok(__struct)
25642    }
25643    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25644        let mut __tmp = BytesMut::new(bytes);
25645        #[allow(clippy::absurd_extreme_comparisons)]
25646        #[allow(unused_comparisons)]
25647        if __tmp.remaining() < Self::ENCODED_LEN {
25648            panic!(
25649                "buffer is too small (need {} bytes, but got {})",
25650                Self::ENCODED_LEN,
25651                __tmp.remaining(),
25652            )
25653        }
25654        __tmp.put_f32_le(self.p1x);
25655        __tmp.put_f32_le(self.p1y);
25656        __tmp.put_f32_le(self.p1z);
25657        __tmp.put_f32_le(self.p2x);
25658        __tmp.put_f32_le(self.p2y);
25659        __tmp.put_f32_le(self.p2z);
25660        __tmp.put_u8(self.target_system);
25661        __tmp.put_u8(self.target_component);
25662        __tmp.put_u8(self.frame as u8);
25663        if matches!(version, MavlinkVersion::V2) {
25664            let len = __tmp.len();
25665            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25666        } else {
25667            __tmp.len()
25668        }
25669    }
25670}
25671#[doc = "id: 26"]
25672#[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
25673#[derive(Debug, Clone, PartialEq)]
25674#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25675#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25676pub struct SCALED_IMU_DATA {
25677    #[doc = "Timestamp (time since system boot)."]
25678    pub time_boot_ms: u32,
25679    #[doc = "X acceleration"]
25680    pub xacc: i16,
25681    #[doc = "Y acceleration"]
25682    pub yacc: i16,
25683    #[doc = "Z acceleration"]
25684    pub zacc: i16,
25685    #[doc = "Angular speed around X axis"]
25686    pub xgyro: i16,
25687    #[doc = "Angular speed around Y axis"]
25688    pub ygyro: i16,
25689    #[doc = "Angular speed around Z axis"]
25690    pub zgyro: i16,
25691    #[doc = "X Magnetic field"]
25692    pub xmag: i16,
25693    #[doc = "Y Magnetic field"]
25694    pub ymag: i16,
25695    #[doc = "Z Magnetic field"]
25696    pub zmag: i16,
25697    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
25698    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25699    pub temperature: i16,
25700}
25701impl SCALED_IMU_DATA {
25702    pub const ENCODED_LEN: usize = 24usize;
25703    pub const DEFAULT: Self = Self {
25704        time_boot_ms: 0_u32,
25705        xacc: 0_i16,
25706        yacc: 0_i16,
25707        zacc: 0_i16,
25708        xgyro: 0_i16,
25709        ygyro: 0_i16,
25710        zgyro: 0_i16,
25711        xmag: 0_i16,
25712        ymag: 0_i16,
25713        zmag: 0_i16,
25714        temperature: 0_i16,
25715    };
25716    #[cfg(feature = "arbitrary")]
25717    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25718        use arbitrary::{Arbitrary, Unstructured};
25719        let mut buf = [0u8; 1024];
25720        rng.fill_bytes(&mut buf);
25721        let mut unstructured = Unstructured::new(&buf);
25722        Self::arbitrary(&mut unstructured).unwrap_or_default()
25723    }
25724}
25725impl Default for SCALED_IMU_DATA {
25726    fn default() -> Self {
25727        Self::DEFAULT.clone()
25728    }
25729}
25730impl MessageData for SCALED_IMU_DATA {
25731    type Message = MavMessage;
25732    const ID: u32 = 26u32;
25733    const NAME: &'static str = "SCALED_IMU";
25734    const EXTRA_CRC: u8 = 170u8;
25735    const ENCODED_LEN: usize = 24usize;
25736    fn deser(
25737        _version: MavlinkVersion,
25738        __input: &[u8],
25739    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25740        let avail_len = __input.len();
25741        let mut payload_buf = [0; Self::ENCODED_LEN];
25742        let mut buf = if avail_len < Self::ENCODED_LEN {
25743            payload_buf[0..avail_len].copy_from_slice(__input);
25744            Bytes::new(&payload_buf)
25745        } else {
25746            Bytes::new(__input)
25747        };
25748        let mut __struct = Self::default();
25749        __struct.time_boot_ms = buf.get_u32_le();
25750        __struct.xacc = buf.get_i16_le();
25751        __struct.yacc = buf.get_i16_le();
25752        __struct.zacc = buf.get_i16_le();
25753        __struct.xgyro = buf.get_i16_le();
25754        __struct.ygyro = buf.get_i16_le();
25755        __struct.zgyro = buf.get_i16_le();
25756        __struct.xmag = buf.get_i16_le();
25757        __struct.ymag = buf.get_i16_le();
25758        __struct.zmag = buf.get_i16_le();
25759        __struct.temperature = buf.get_i16_le();
25760        Ok(__struct)
25761    }
25762    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25763        let mut __tmp = BytesMut::new(bytes);
25764        #[allow(clippy::absurd_extreme_comparisons)]
25765        #[allow(unused_comparisons)]
25766        if __tmp.remaining() < Self::ENCODED_LEN {
25767            panic!(
25768                "buffer is too small (need {} bytes, but got {})",
25769                Self::ENCODED_LEN,
25770                __tmp.remaining(),
25771            )
25772        }
25773        __tmp.put_u32_le(self.time_boot_ms);
25774        __tmp.put_i16_le(self.xacc);
25775        __tmp.put_i16_le(self.yacc);
25776        __tmp.put_i16_le(self.zacc);
25777        __tmp.put_i16_le(self.xgyro);
25778        __tmp.put_i16_le(self.ygyro);
25779        __tmp.put_i16_le(self.zgyro);
25780        __tmp.put_i16_le(self.xmag);
25781        __tmp.put_i16_le(self.ymag);
25782        __tmp.put_i16_le(self.zmag);
25783        __tmp.put_i16_le(self.temperature);
25784        if matches!(version, MavlinkVersion::V2) {
25785            let len = __tmp.len();
25786            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25787        } else {
25788            __tmp.len()
25789        }
25790    }
25791}
25792#[doc = "id: 116"]
25793#[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
25794#[derive(Debug, Clone, PartialEq)]
25795#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25796#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25797pub struct SCALED_IMU2_DATA {
25798    #[doc = "Timestamp (time since system boot)."]
25799    pub time_boot_ms: u32,
25800    #[doc = "X acceleration"]
25801    pub xacc: i16,
25802    #[doc = "Y acceleration"]
25803    pub yacc: i16,
25804    #[doc = "Z acceleration"]
25805    pub zacc: i16,
25806    #[doc = "Angular speed around X axis"]
25807    pub xgyro: i16,
25808    #[doc = "Angular speed around Y axis"]
25809    pub ygyro: i16,
25810    #[doc = "Angular speed around Z axis"]
25811    pub zgyro: i16,
25812    #[doc = "X Magnetic field"]
25813    pub xmag: i16,
25814    #[doc = "Y Magnetic field"]
25815    pub ymag: i16,
25816    #[doc = "Z Magnetic field"]
25817    pub zmag: i16,
25818    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
25819    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25820    pub temperature: i16,
25821}
25822impl SCALED_IMU2_DATA {
25823    pub const ENCODED_LEN: usize = 24usize;
25824    pub const DEFAULT: Self = Self {
25825        time_boot_ms: 0_u32,
25826        xacc: 0_i16,
25827        yacc: 0_i16,
25828        zacc: 0_i16,
25829        xgyro: 0_i16,
25830        ygyro: 0_i16,
25831        zgyro: 0_i16,
25832        xmag: 0_i16,
25833        ymag: 0_i16,
25834        zmag: 0_i16,
25835        temperature: 0_i16,
25836    };
25837    #[cfg(feature = "arbitrary")]
25838    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25839        use arbitrary::{Arbitrary, Unstructured};
25840        let mut buf = [0u8; 1024];
25841        rng.fill_bytes(&mut buf);
25842        let mut unstructured = Unstructured::new(&buf);
25843        Self::arbitrary(&mut unstructured).unwrap_or_default()
25844    }
25845}
25846impl Default for SCALED_IMU2_DATA {
25847    fn default() -> Self {
25848        Self::DEFAULT.clone()
25849    }
25850}
25851impl MessageData for SCALED_IMU2_DATA {
25852    type Message = MavMessage;
25853    const ID: u32 = 116u32;
25854    const NAME: &'static str = "SCALED_IMU2";
25855    const EXTRA_CRC: u8 = 76u8;
25856    const ENCODED_LEN: usize = 24usize;
25857    fn deser(
25858        _version: MavlinkVersion,
25859        __input: &[u8],
25860    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25861        let avail_len = __input.len();
25862        let mut payload_buf = [0; Self::ENCODED_LEN];
25863        let mut buf = if avail_len < Self::ENCODED_LEN {
25864            payload_buf[0..avail_len].copy_from_slice(__input);
25865            Bytes::new(&payload_buf)
25866        } else {
25867            Bytes::new(__input)
25868        };
25869        let mut __struct = Self::default();
25870        __struct.time_boot_ms = buf.get_u32_le();
25871        __struct.xacc = buf.get_i16_le();
25872        __struct.yacc = buf.get_i16_le();
25873        __struct.zacc = buf.get_i16_le();
25874        __struct.xgyro = buf.get_i16_le();
25875        __struct.ygyro = buf.get_i16_le();
25876        __struct.zgyro = buf.get_i16_le();
25877        __struct.xmag = buf.get_i16_le();
25878        __struct.ymag = buf.get_i16_le();
25879        __struct.zmag = buf.get_i16_le();
25880        __struct.temperature = buf.get_i16_le();
25881        Ok(__struct)
25882    }
25883    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25884        let mut __tmp = BytesMut::new(bytes);
25885        #[allow(clippy::absurd_extreme_comparisons)]
25886        #[allow(unused_comparisons)]
25887        if __tmp.remaining() < Self::ENCODED_LEN {
25888            panic!(
25889                "buffer is too small (need {} bytes, but got {})",
25890                Self::ENCODED_LEN,
25891                __tmp.remaining(),
25892            )
25893        }
25894        __tmp.put_u32_le(self.time_boot_ms);
25895        __tmp.put_i16_le(self.xacc);
25896        __tmp.put_i16_le(self.yacc);
25897        __tmp.put_i16_le(self.zacc);
25898        __tmp.put_i16_le(self.xgyro);
25899        __tmp.put_i16_le(self.ygyro);
25900        __tmp.put_i16_le(self.zgyro);
25901        __tmp.put_i16_le(self.xmag);
25902        __tmp.put_i16_le(self.ymag);
25903        __tmp.put_i16_le(self.zmag);
25904        __tmp.put_i16_le(self.temperature);
25905        if matches!(version, MavlinkVersion::V2) {
25906            let len = __tmp.len();
25907            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25908        } else {
25909            __tmp.len()
25910        }
25911    }
25912}
25913#[doc = "id: 129"]
25914#[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
25915#[derive(Debug, Clone, PartialEq)]
25916#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25917#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25918pub struct SCALED_IMU3_DATA {
25919    #[doc = "Timestamp (time since system boot)."]
25920    pub time_boot_ms: u32,
25921    #[doc = "X acceleration"]
25922    pub xacc: i16,
25923    #[doc = "Y acceleration"]
25924    pub yacc: i16,
25925    #[doc = "Z acceleration"]
25926    pub zacc: i16,
25927    #[doc = "Angular speed around X axis"]
25928    pub xgyro: i16,
25929    #[doc = "Angular speed around Y axis"]
25930    pub ygyro: i16,
25931    #[doc = "Angular speed around Z axis"]
25932    pub zgyro: i16,
25933    #[doc = "X Magnetic field"]
25934    pub xmag: i16,
25935    #[doc = "Y Magnetic field"]
25936    pub ymag: i16,
25937    #[doc = "Z Magnetic field"]
25938    pub zmag: i16,
25939    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
25940    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25941    pub temperature: i16,
25942}
25943impl SCALED_IMU3_DATA {
25944    pub const ENCODED_LEN: usize = 24usize;
25945    pub const DEFAULT: Self = Self {
25946        time_boot_ms: 0_u32,
25947        xacc: 0_i16,
25948        yacc: 0_i16,
25949        zacc: 0_i16,
25950        xgyro: 0_i16,
25951        ygyro: 0_i16,
25952        zgyro: 0_i16,
25953        xmag: 0_i16,
25954        ymag: 0_i16,
25955        zmag: 0_i16,
25956        temperature: 0_i16,
25957    };
25958    #[cfg(feature = "arbitrary")]
25959    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25960        use arbitrary::{Arbitrary, Unstructured};
25961        let mut buf = [0u8; 1024];
25962        rng.fill_bytes(&mut buf);
25963        let mut unstructured = Unstructured::new(&buf);
25964        Self::arbitrary(&mut unstructured).unwrap_or_default()
25965    }
25966}
25967impl Default for SCALED_IMU3_DATA {
25968    fn default() -> Self {
25969        Self::DEFAULT.clone()
25970    }
25971}
25972impl MessageData for SCALED_IMU3_DATA {
25973    type Message = MavMessage;
25974    const ID: u32 = 129u32;
25975    const NAME: &'static str = "SCALED_IMU3";
25976    const EXTRA_CRC: u8 = 46u8;
25977    const ENCODED_LEN: usize = 24usize;
25978    fn deser(
25979        _version: MavlinkVersion,
25980        __input: &[u8],
25981    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25982        let avail_len = __input.len();
25983        let mut payload_buf = [0; Self::ENCODED_LEN];
25984        let mut buf = if avail_len < Self::ENCODED_LEN {
25985            payload_buf[0..avail_len].copy_from_slice(__input);
25986            Bytes::new(&payload_buf)
25987        } else {
25988            Bytes::new(__input)
25989        };
25990        let mut __struct = Self::default();
25991        __struct.time_boot_ms = buf.get_u32_le();
25992        __struct.xacc = buf.get_i16_le();
25993        __struct.yacc = buf.get_i16_le();
25994        __struct.zacc = buf.get_i16_le();
25995        __struct.xgyro = buf.get_i16_le();
25996        __struct.ygyro = buf.get_i16_le();
25997        __struct.zgyro = buf.get_i16_le();
25998        __struct.xmag = buf.get_i16_le();
25999        __struct.ymag = buf.get_i16_le();
26000        __struct.zmag = buf.get_i16_le();
26001        __struct.temperature = buf.get_i16_le();
26002        Ok(__struct)
26003    }
26004    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26005        let mut __tmp = BytesMut::new(bytes);
26006        #[allow(clippy::absurd_extreme_comparisons)]
26007        #[allow(unused_comparisons)]
26008        if __tmp.remaining() < Self::ENCODED_LEN {
26009            panic!(
26010                "buffer is too small (need {} bytes, but got {})",
26011                Self::ENCODED_LEN,
26012                __tmp.remaining(),
26013            )
26014        }
26015        __tmp.put_u32_le(self.time_boot_ms);
26016        __tmp.put_i16_le(self.xacc);
26017        __tmp.put_i16_le(self.yacc);
26018        __tmp.put_i16_le(self.zacc);
26019        __tmp.put_i16_le(self.xgyro);
26020        __tmp.put_i16_le(self.ygyro);
26021        __tmp.put_i16_le(self.zgyro);
26022        __tmp.put_i16_le(self.xmag);
26023        __tmp.put_i16_le(self.ymag);
26024        __tmp.put_i16_le(self.zmag);
26025        __tmp.put_i16_le(self.temperature);
26026        if matches!(version, MavlinkVersion::V2) {
26027            let len = __tmp.len();
26028            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26029        } else {
26030            __tmp.len()
26031        }
26032    }
26033}
26034#[doc = "id: 29"]
26035#[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
26036#[derive(Debug, Clone, PartialEq)]
26037#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26038#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26039pub struct SCALED_PRESSURE_DATA {
26040    #[doc = "Timestamp (time since system boot)."]
26041    pub time_boot_ms: u32,
26042    #[doc = "Absolute pressure"]
26043    pub press_abs: f32,
26044    #[doc = "Differential pressure 1"]
26045    pub press_diff: f32,
26046    #[doc = "Absolute pressure temperature"]
26047    pub temperature: i16,
26048    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
26049    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26050    pub temperature_press_diff: i16,
26051}
26052impl SCALED_PRESSURE_DATA {
26053    pub const ENCODED_LEN: usize = 16usize;
26054    pub const DEFAULT: Self = Self {
26055        time_boot_ms: 0_u32,
26056        press_abs: 0.0_f32,
26057        press_diff: 0.0_f32,
26058        temperature: 0_i16,
26059        temperature_press_diff: 0_i16,
26060    };
26061    #[cfg(feature = "arbitrary")]
26062    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26063        use arbitrary::{Arbitrary, Unstructured};
26064        let mut buf = [0u8; 1024];
26065        rng.fill_bytes(&mut buf);
26066        let mut unstructured = Unstructured::new(&buf);
26067        Self::arbitrary(&mut unstructured).unwrap_or_default()
26068    }
26069}
26070impl Default for SCALED_PRESSURE_DATA {
26071    fn default() -> Self {
26072        Self::DEFAULT.clone()
26073    }
26074}
26075impl MessageData for SCALED_PRESSURE_DATA {
26076    type Message = MavMessage;
26077    const ID: u32 = 29u32;
26078    const NAME: &'static str = "SCALED_PRESSURE";
26079    const EXTRA_CRC: u8 = 115u8;
26080    const ENCODED_LEN: usize = 16usize;
26081    fn deser(
26082        _version: MavlinkVersion,
26083        __input: &[u8],
26084    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26085        let avail_len = __input.len();
26086        let mut payload_buf = [0; Self::ENCODED_LEN];
26087        let mut buf = if avail_len < Self::ENCODED_LEN {
26088            payload_buf[0..avail_len].copy_from_slice(__input);
26089            Bytes::new(&payload_buf)
26090        } else {
26091            Bytes::new(__input)
26092        };
26093        let mut __struct = Self::default();
26094        __struct.time_boot_ms = buf.get_u32_le();
26095        __struct.press_abs = buf.get_f32_le();
26096        __struct.press_diff = buf.get_f32_le();
26097        __struct.temperature = buf.get_i16_le();
26098        __struct.temperature_press_diff = buf.get_i16_le();
26099        Ok(__struct)
26100    }
26101    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26102        let mut __tmp = BytesMut::new(bytes);
26103        #[allow(clippy::absurd_extreme_comparisons)]
26104        #[allow(unused_comparisons)]
26105        if __tmp.remaining() < Self::ENCODED_LEN {
26106            panic!(
26107                "buffer is too small (need {} bytes, but got {})",
26108                Self::ENCODED_LEN,
26109                __tmp.remaining(),
26110            )
26111        }
26112        __tmp.put_u32_le(self.time_boot_ms);
26113        __tmp.put_f32_le(self.press_abs);
26114        __tmp.put_f32_le(self.press_diff);
26115        __tmp.put_i16_le(self.temperature);
26116        __tmp.put_i16_le(self.temperature_press_diff);
26117        if matches!(version, MavlinkVersion::V2) {
26118            let len = __tmp.len();
26119            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26120        } else {
26121            __tmp.len()
26122        }
26123    }
26124}
26125#[doc = "id: 137"]
26126#[doc = "Barometer readings for 2nd barometer."]
26127#[derive(Debug, Clone, PartialEq)]
26128#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26129#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26130pub struct SCALED_PRESSURE2_DATA {
26131    #[doc = "Timestamp (time since system boot)."]
26132    pub time_boot_ms: u32,
26133    #[doc = "Absolute pressure"]
26134    pub press_abs: f32,
26135    #[doc = "Differential pressure"]
26136    pub press_diff: f32,
26137    #[doc = "Absolute pressure temperature"]
26138    pub temperature: i16,
26139    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
26140    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26141    pub temperature_press_diff: i16,
26142}
26143impl SCALED_PRESSURE2_DATA {
26144    pub const ENCODED_LEN: usize = 16usize;
26145    pub const DEFAULT: Self = Self {
26146        time_boot_ms: 0_u32,
26147        press_abs: 0.0_f32,
26148        press_diff: 0.0_f32,
26149        temperature: 0_i16,
26150        temperature_press_diff: 0_i16,
26151    };
26152    #[cfg(feature = "arbitrary")]
26153    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26154        use arbitrary::{Arbitrary, Unstructured};
26155        let mut buf = [0u8; 1024];
26156        rng.fill_bytes(&mut buf);
26157        let mut unstructured = Unstructured::new(&buf);
26158        Self::arbitrary(&mut unstructured).unwrap_or_default()
26159    }
26160}
26161impl Default for SCALED_PRESSURE2_DATA {
26162    fn default() -> Self {
26163        Self::DEFAULT.clone()
26164    }
26165}
26166impl MessageData for SCALED_PRESSURE2_DATA {
26167    type Message = MavMessage;
26168    const ID: u32 = 137u32;
26169    const NAME: &'static str = "SCALED_PRESSURE2";
26170    const EXTRA_CRC: u8 = 195u8;
26171    const ENCODED_LEN: usize = 16usize;
26172    fn deser(
26173        _version: MavlinkVersion,
26174        __input: &[u8],
26175    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26176        let avail_len = __input.len();
26177        let mut payload_buf = [0; Self::ENCODED_LEN];
26178        let mut buf = if avail_len < Self::ENCODED_LEN {
26179            payload_buf[0..avail_len].copy_from_slice(__input);
26180            Bytes::new(&payload_buf)
26181        } else {
26182            Bytes::new(__input)
26183        };
26184        let mut __struct = Self::default();
26185        __struct.time_boot_ms = buf.get_u32_le();
26186        __struct.press_abs = buf.get_f32_le();
26187        __struct.press_diff = buf.get_f32_le();
26188        __struct.temperature = buf.get_i16_le();
26189        __struct.temperature_press_diff = buf.get_i16_le();
26190        Ok(__struct)
26191    }
26192    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26193        let mut __tmp = BytesMut::new(bytes);
26194        #[allow(clippy::absurd_extreme_comparisons)]
26195        #[allow(unused_comparisons)]
26196        if __tmp.remaining() < Self::ENCODED_LEN {
26197            panic!(
26198                "buffer is too small (need {} bytes, but got {})",
26199                Self::ENCODED_LEN,
26200                __tmp.remaining(),
26201            )
26202        }
26203        __tmp.put_u32_le(self.time_boot_ms);
26204        __tmp.put_f32_le(self.press_abs);
26205        __tmp.put_f32_le(self.press_diff);
26206        __tmp.put_i16_le(self.temperature);
26207        __tmp.put_i16_le(self.temperature_press_diff);
26208        if matches!(version, MavlinkVersion::V2) {
26209            let len = __tmp.len();
26210            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26211        } else {
26212            __tmp.len()
26213        }
26214    }
26215}
26216#[doc = "id: 143"]
26217#[doc = "Barometer readings for 3rd barometer."]
26218#[derive(Debug, Clone, PartialEq)]
26219#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26220#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26221pub struct SCALED_PRESSURE3_DATA {
26222    #[doc = "Timestamp (time since system boot)."]
26223    pub time_boot_ms: u32,
26224    #[doc = "Absolute pressure"]
26225    pub press_abs: f32,
26226    #[doc = "Differential pressure"]
26227    pub press_diff: f32,
26228    #[doc = "Absolute pressure temperature"]
26229    pub temperature: i16,
26230    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
26231    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26232    pub temperature_press_diff: i16,
26233}
26234impl SCALED_PRESSURE3_DATA {
26235    pub const ENCODED_LEN: usize = 16usize;
26236    pub const DEFAULT: Self = Self {
26237        time_boot_ms: 0_u32,
26238        press_abs: 0.0_f32,
26239        press_diff: 0.0_f32,
26240        temperature: 0_i16,
26241        temperature_press_diff: 0_i16,
26242    };
26243    #[cfg(feature = "arbitrary")]
26244    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26245        use arbitrary::{Arbitrary, Unstructured};
26246        let mut buf = [0u8; 1024];
26247        rng.fill_bytes(&mut buf);
26248        let mut unstructured = Unstructured::new(&buf);
26249        Self::arbitrary(&mut unstructured).unwrap_or_default()
26250    }
26251}
26252impl Default for SCALED_PRESSURE3_DATA {
26253    fn default() -> Self {
26254        Self::DEFAULT.clone()
26255    }
26256}
26257impl MessageData for SCALED_PRESSURE3_DATA {
26258    type Message = MavMessage;
26259    const ID: u32 = 143u32;
26260    const NAME: &'static str = "SCALED_PRESSURE3";
26261    const EXTRA_CRC: u8 = 131u8;
26262    const ENCODED_LEN: usize = 16usize;
26263    fn deser(
26264        _version: MavlinkVersion,
26265        __input: &[u8],
26266    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26267        let avail_len = __input.len();
26268        let mut payload_buf = [0; Self::ENCODED_LEN];
26269        let mut buf = if avail_len < Self::ENCODED_LEN {
26270            payload_buf[0..avail_len].copy_from_slice(__input);
26271            Bytes::new(&payload_buf)
26272        } else {
26273            Bytes::new(__input)
26274        };
26275        let mut __struct = Self::default();
26276        __struct.time_boot_ms = buf.get_u32_le();
26277        __struct.press_abs = buf.get_f32_le();
26278        __struct.press_diff = buf.get_f32_le();
26279        __struct.temperature = buf.get_i16_le();
26280        __struct.temperature_press_diff = buf.get_i16_le();
26281        Ok(__struct)
26282    }
26283    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26284        let mut __tmp = BytesMut::new(bytes);
26285        #[allow(clippy::absurd_extreme_comparisons)]
26286        #[allow(unused_comparisons)]
26287        if __tmp.remaining() < Self::ENCODED_LEN {
26288            panic!(
26289                "buffer is too small (need {} bytes, but got {})",
26290                Self::ENCODED_LEN,
26291                __tmp.remaining(),
26292            )
26293        }
26294        __tmp.put_u32_le(self.time_boot_ms);
26295        __tmp.put_f32_le(self.press_abs);
26296        __tmp.put_f32_le(self.press_diff);
26297        __tmp.put_i16_le(self.temperature);
26298        __tmp.put_i16_le(self.temperature_press_diff);
26299        if matches!(version, MavlinkVersion::V2) {
26300            let len = __tmp.len();
26301            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26302        } else {
26303            __tmp.len()
26304        }
26305    }
26306}
26307#[doc = "id: 126"]
26308#[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
26309#[derive(Debug, Clone, PartialEq)]
26310#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26311#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26312pub struct SERIAL_CONTROL_DATA {
26313    #[doc = "Baudrate of transfer. Zero means no change."]
26314    pub baudrate: u32,
26315    #[doc = "Timeout for reply data"]
26316    pub timeout: u16,
26317    #[doc = "Serial control device type."]
26318    pub device: SerialControlDev,
26319    #[doc = "Bitmap of serial control flags."]
26320    pub flags: SerialControlFlag,
26321    #[doc = "how many bytes in this transfer"]
26322    pub count: u8,
26323    #[doc = "serial data"]
26324    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26325    pub data: [u8; 70],
26326    #[doc = "System ID"]
26327    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26328    pub target_system: u8,
26329    #[doc = "Component ID"]
26330    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26331    pub target_component: u8,
26332}
26333impl SERIAL_CONTROL_DATA {
26334    pub const ENCODED_LEN: usize = 81usize;
26335    pub const DEFAULT: Self = Self {
26336        baudrate: 0_u32,
26337        timeout: 0_u16,
26338        device: SerialControlDev::DEFAULT,
26339        flags: SerialControlFlag::DEFAULT,
26340        count: 0_u8,
26341        data: [0_u8; 70usize],
26342        target_system: 0_u8,
26343        target_component: 0_u8,
26344    };
26345    #[cfg(feature = "arbitrary")]
26346    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26347        use arbitrary::{Arbitrary, Unstructured};
26348        let mut buf = [0u8; 1024];
26349        rng.fill_bytes(&mut buf);
26350        let mut unstructured = Unstructured::new(&buf);
26351        Self::arbitrary(&mut unstructured).unwrap_or_default()
26352    }
26353}
26354impl Default for SERIAL_CONTROL_DATA {
26355    fn default() -> Self {
26356        Self::DEFAULT.clone()
26357    }
26358}
26359impl MessageData for SERIAL_CONTROL_DATA {
26360    type Message = MavMessage;
26361    const ID: u32 = 126u32;
26362    const NAME: &'static str = "SERIAL_CONTROL";
26363    const EXTRA_CRC: u8 = 220u8;
26364    const ENCODED_LEN: usize = 81usize;
26365    fn deser(
26366        _version: MavlinkVersion,
26367        __input: &[u8],
26368    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26369        let avail_len = __input.len();
26370        let mut payload_buf = [0; Self::ENCODED_LEN];
26371        let mut buf = if avail_len < Self::ENCODED_LEN {
26372            payload_buf[0..avail_len].copy_from_slice(__input);
26373            Bytes::new(&payload_buf)
26374        } else {
26375            Bytes::new(__input)
26376        };
26377        let mut __struct = Self::default();
26378        __struct.baudrate = buf.get_u32_le();
26379        __struct.timeout = buf.get_u16_le();
26380        let tmp = buf.get_u8();
26381        __struct.device =
26382            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26383                enum_type: "SerialControlDev",
26384                value: tmp as u32,
26385            })?;
26386        let tmp = buf.get_u8();
26387        __struct.flags = SerialControlFlag::from_bits(tmp & SerialControlFlag::all().bits())
26388            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
26389                flag_type: "SerialControlFlag",
26390                value: tmp as u32,
26391            })?;
26392        __struct.count = buf.get_u8();
26393        for v in &mut __struct.data {
26394            let val = buf.get_u8();
26395            *v = val;
26396        }
26397        __struct.target_system = buf.get_u8();
26398        __struct.target_component = buf.get_u8();
26399        Ok(__struct)
26400    }
26401    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26402        let mut __tmp = BytesMut::new(bytes);
26403        #[allow(clippy::absurd_extreme_comparisons)]
26404        #[allow(unused_comparisons)]
26405        if __tmp.remaining() < Self::ENCODED_LEN {
26406            panic!(
26407                "buffer is too small (need {} bytes, but got {})",
26408                Self::ENCODED_LEN,
26409                __tmp.remaining(),
26410            )
26411        }
26412        __tmp.put_u32_le(self.baudrate);
26413        __tmp.put_u16_le(self.timeout);
26414        __tmp.put_u8(self.device as u8);
26415        __tmp.put_u8(self.flags.bits());
26416        __tmp.put_u8(self.count);
26417        for val in &self.data {
26418            __tmp.put_u8(*val);
26419        }
26420        __tmp.put_u8(self.target_system);
26421        __tmp.put_u8(self.target_component);
26422        if matches!(version, MavlinkVersion::V2) {
26423            let len = __tmp.len();
26424            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26425        } else {
26426            __tmp.len()
26427        }
26428    }
26429}
26430#[doc = "id: 36"]
26431#[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
26432#[derive(Debug, Clone, PartialEq)]
26433#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26434#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26435pub struct SERVO_OUTPUT_RAW_DATA {
26436    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
26437    pub time_usec: u32,
26438    #[doc = "Servo output 1 value"]
26439    pub servo1_raw: u16,
26440    #[doc = "Servo output 2 value"]
26441    pub servo2_raw: u16,
26442    #[doc = "Servo output 3 value"]
26443    pub servo3_raw: u16,
26444    #[doc = "Servo output 4 value"]
26445    pub servo4_raw: u16,
26446    #[doc = "Servo output 5 value"]
26447    pub servo5_raw: u16,
26448    #[doc = "Servo output 6 value"]
26449    pub servo6_raw: u16,
26450    #[doc = "Servo output 7 value"]
26451    pub servo7_raw: u16,
26452    #[doc = "Servo output 8 value"]
26453    pub servo8_raw: u16,
26454    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
26455    pub port: u8,
26456    #[doc = "Servo output 9 value"]
26457    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26458    pub servo9_raw: u16,
26459    #[doc = "Servo output 10 value"]
26460    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26461    pub servo10_raw: u16,
26462    #[doc = "Servo output 11 value"]
26463    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26464    pub servo11_raw: u16,
26465    #[doc = "Servo output 12 value"]
26466    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26467    pub servo12_raw: u16,
26468    #[doc = "Servo output 13 value"]
26469    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26470    pub servo13_raw: u16,
26471    #[doc = "Servo output 14 value"]
26472    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26473    pub servo14_raw: u16,
26474    #[doc = "Servo output 15 value"]
26475    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26476    pub servo15_raw: u16,
26477    #[doc = "Servo output 16 value"]
26478    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26479    pub servo16_raw: u16,
26480}
26481impl SERVO_OUTPUT_RAW_DATA {
26482    pub const ENCODED_LEN: usize = 37usize;
26483    pub const DEFAULT: Self = Self {
26484        time_usec: 0_u32,
26485        servo1_raw: 0_u16,
26486        servo2_raw: 0_u16,
26487        servo3_raw: 0_u16,
26488        servo4_raw: 0_u16,
26489        servo5_raw: 0_u16,
26490        servo6_raw: 0_u16,
26491        servo7_raw: 0_u16,
26492        servo8_raw: 0_u16,
26493        port: 0_u8,
26494        servo9_raw: 0_u16,
26495        servo10_raw: 0_u16,
26496        servo11_raw: 0_u16,
26497        servo12_raw: 0_u16,
26498        servo13_raw: 0_u16,
26499        servo14_raw: 0_u16,
26500        servo15_raw: 0_u16,
26501        servo16_raw: 0_u16,
26502    };
26503    #[cfg(feature = "arbitrary")]
26504    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26505        use arbitrary::{Arbitrary, Unstructured};
26506        let mut buf = [0u8; 1024];
26507        rng.fill_bytes(&mut buf);
26508        let mut unstructured = Unstructured::new(&buf);
26509        Self::arbitrary(&mut unstructured).unwrap_or_default()
26510    }
26511}
26512impl Default for SERVO_OUTPUT_RAW_DATA {
26513    fn default() -> Self {
26514        Self::DEFAULT.clone()
26515    }
26516}
26517impl MessageData for SERVO_OUTPUT_RAW_DATA {
26518    type Message = MavMessage;
26519    const ID: u32 = 36u32;
26520    const NAME: &'static str = "SERVO_OUTPUT_RAW";
26521    const EXTRA_CRC: u8 = 222u8;
26522    const ENCODED_LEN: usize = 37usize;
26523    fn deser(
26524        _version: MavlinkVersion,
26525        __input: &[u8],
26526    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26527        let avail_len = __input.len();
26528        let mut payload_buf = [0; Self::ENCODED_LEN];
26529        let mut buf = if avail_len < Self::ENCODED_LEN {
26530            payload_buf[0..avail_len].copy_from_slice(__input);
26531            Bytes::new(&payload_buf)
26532        } else {
26533            Bytes::new(__input)
26534        };
26535        let mut __struct = Self::default();
26536        __struct.time_usec = buf.get_u32_le();
26537        __struct.servo1_raw = buf.get_u16_le();
26538        __struct.servo2_raw = buf.get_u16_le();
26539        __struct.servo3_raw = buf.get_u16_le();
26540        __struct.servo4_raw = buf.get_u16_le();
26541        __struct.servo5_raw = buf.get_u16_le();
26542        __struct.servo6_raw = buf.get_u16_le();
26543        __struct.servo7_raw = buf.get_u16_le();
26544        __struct.servo8_raw = buf.get_u16_le();
26545        __struct.port = buf.get_u8();
26546        __struct.servo9_raw = buf.get_u16_le();
26547        __struct.servo10_raw = buf.get_u16_le();
26548        __struct.servo11_raw = buf.get_u16_le();
26549        __struct.servo12_raw = buf.get_u16_le();
26550        __struct.servo13_raw = buf.get_u16_le();
26551        __struct.servo14_raw = buf.get_u16_le();
26552        __struct.servo15_raw = buf.get_u16_le();
26553        __struct.servo16_raw = buf.get_u16_le();
26554        Ok(__struct)
26555    }
26556    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26557        let mut __tmp = BytesMut::new(bytes);
26558        #[allow(clippy::absurd_extreme_comparisons)]
26559        #[allow(unused_comparisons)]
26560        if __tmp.remaining() < Self::ENCODED_LEN {
26561            panic!(
26562                "buffer is too small (need {} bytes, but got {})",
26563                Self::ENCODED_LEN,
26564                __tmp.remaining(),
26565            )
26566        }
26567        __tmp.put_u32_le(self.time_usec);
26568        __tmp.put_u16_le(self.servo1_raw);
26569        __tmp.put_u16_le(self.servo2_raw);
26570        __tmp.put_u16_le(self.servo3_raw);
26571        __tmp.put_u16_le(self.servo4_raw);
26572        __tmp.put_u16_le(self.servo5_raw);
26573        __tmp.put_u16_le(self.servo6_raw);
26574        __tmp.put_u16_le(self.servo7_raw);
26575        __tmp.put_u16_le(self.servo8_raw);
26576        __tmp.put_u8(self.port);
26577        __tmp.put_u16_le(self.servo9_raw);
26578        __tmp.put_u16_le(self.servo10_raw);
26579        __tmp.put_u16_le(self.servo11_raw);
26580        __tmp.put_u16_le(self.servo12_raw);
26581        __tmp.put_u16_le(self.servo13_raw);
26582        __tmp.put_u16_le(self.servo14_raw);
26583        __tmp.put_u16_le(self.servo15_raw);
26584        __tmp.put_u16_le(self.servo16_raw);
26585        if matches!(version, MavlinkVersion::V2) {
26586            let len = __tmp.len();
26587            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26588        } else {
26589            __tmp.len()
26590        }
26591    }
26592}
26593#[doc = "id: 256"]
26594#[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
26595#[derive(Debug, Clone, PartialEq)]
26596#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26597#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26598pub struct SETUP_SIGNING_DATA {
26599    #[doc = "initial timestamp"]
26600    pub initial_timestamp: u64,
26601    #[doc = "system id of the target"]
26602    pub target_system: u8,
26603    #[doc = "component ID of the target"]
26604    pub target_component: u8,
26605    #[doc = "signing key"]
26606    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26607    pub secret_key: [u8; 32],
26608}
26609impl SETUP_SIGNING_DATA {
26610    pub const ENCODED_LEN: usize = 42usize;
26611    pub const DEFAULT: Self = Self {
26612        initial_timestamp: 0_u64,
26613        target_system: 0_u8,
26614        target_component: 0_u8,
26615        secret_key: [0_u8; 32usize],
26616    };
26617    #[cfg(feature = "arbitrary")]
26618    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26619        use arbitrary::{Arbitrary, Unstructured};
26620        let mut buf = [0u8; 1024];
26621        rng.fill_bytes(&mut buf);
26622        let mut unstructured = Unstructured::new(&buf);
26623        Self::arbitrary(&mut unstructured).unwrap_or_default()
26624    }
26625}
26626impl Default for SETUP_SIGNING_DATA {
26627    fn default() -> Self {
26628        Self::DEFAULT.clone()
26629    }
26630}
26631impl MessageData for SETUP_SIGNING_DATA {
26632    type Message = MavMessage;
26633    const ID: u32 = 256u32;
26634    const NAME: &'static str = "SETUP_SIGNING";
26635    const EXTRA_CRC: u8 = 71u8;
26636    const ENCODED_LEN: usize = 42usize;
26637    fn deser(
26638        _version: MavlinkVersion,
26639        __input: &[u8],
26640    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26641        let avail_len = __input.len();
26642        let mut payload_buf = [0; Self::ENCODED_LEN];
26643        let mut buf = if avail_len < Self::ENCODED_LEN {
26644            payload_buf[0..avail_len].copy_from_slice(__input);
26645            Bytes::new(&payload_buf)
26646        } else {
26647            Bytes::new(__input)
26648        };
26649        let mut __struct = Self::default();
26650        __struct.initial_timestamp = buf.get_u64_le();
26651        __struct.target_system = buf.get_u8();
26652        __struct.target_component = buf.get_u8();
26653        for v in &mut __struct.secret_key {
26654            let val = buf.get_u8();
26655            *v = val;
26656        }
26657        Ok(__struct)
26658    }
26659    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26660        let mut __tmp = BytesMut::new(bytes);
26661        #[allow(clippy::absurd_extreme_comparisons)]
26662        #[allow(unused_comparisons)]
26663        if __tmp.remaining() < Self::ENCODED_LEN {
26664            panic!(
26665                "buffer is too small (need {} bytes, but got {})",
26666                Self::ENCODED_LEN,
26667                __tmp.remaining(),
26668            )
26669        }
26670        __tmp.put_u64_le(self.initial_timestamp);
26671        __tmp.put_u8(self.target_system);
26672        __tmp.put_u8(self.target_component);
26673        for val in &self.secret_key {
26674            __tmp.put_u8(*val);
26675        }
26676        if matches!(version, MavlinkVersion::V2) {
26677            let len = __tmp.len();
26678            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26679        } else {
26680            __tmp.len()
26681        }
26682    }
26683}
26684#[doc = "id: 139"]
26685#[doc = "Set the vehicle attitude and body angular rates."]
26686#[derive(Debug, Clone, PartialEq)]
26687#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26688#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26689pub struct SET_ACTUATOR_CONTROL_TARGET_DATA {
26690    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
26691    pub time_usec: u64,
26692    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
26693    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26694    pub controls: [f32; 8],
26695    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
26696    pub group_mlx: u8,
26697    #[doc = "System ID"]
26698    pub target_system: u8,
26699    #[doc = "Component ID"]
26700    pub target_component: u8,
26701}
26702impl SET_ACTUATOR_CONTROL_TARGET_DATA {
26703    pub const ENCODED_LEN: usize = 43usize;
26704    pub const DEFAULT: Self = Self {
26705        time_usec: 0_u64,
26706        controls: [0.0_f32; 8usize],
26707        group_mlx: 0_u8,
26708        target_system: 0_u8,
26709        target_component: 0_u8,
26710    };
26711    #[cfg(feature = "arbitrary")]
26712    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26713        use arbitrary::{Arbitrary, Unstructured};
26714        let mut buf = [0u8; 1024];
26715        rng.fill_bytes(&mut buf);
26716        let mut unstructured = Unstructured::new(&buf);
26717        Self::arbitrary(&mut unstructured).unwrap_or_default()
26718    }
26719}
26720impl Default for SET_ACTUATOR_CONTROL_TARGET_DATA {
26721    fn default() -> Self {
26722        Self::DEFAULT.clone()
26723    }
26724}
26725impl MessageData for SET_ACTUATOR_CONTROL_TARGET_DATA {
26726    type Message = MavMessage;
26727    const ID: u32 = 139u32;
26728    const NAME: &'static str = "SET_ACTUATOR_CONTROL_TARGET";
26729    const EXTRA_CRC: u8 = 168u8;
26730    const ENCODED_LEN: usize = 43usize;
26731    fn deser(
26732        _version: MavlinkVersion,
26733        __input: &[u8],
26734    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26735        let avail_len = __input.len();
26736        let mut payload_buf = [0; Self::ENCODED_LEN];
26737        let mut buf = if avail_len < Self::ENCODED_LEN {
26738            payload_buf[0..avail_len].copy_from_slice(__input);
26739            Bytes::new(&payload_buf)
26740        } else {
26741            Bytes::new(__input)
26742        };
26743        let mut __struct = Self::default();
26744        __struct.time_usec = buf.get_u64_le();
26745        for v in &mut __struct.controls {
26746            let val = buf.get_f32_le();
26747            *v = val;
26748        }
26749        __struct.group_mlx = buf.get_u8();
26750        __struct.target_system = buf.get_u8();
26751        __struct.target_component = buf.get_u8();
26752        Ok(__struct)
26753    }
26754    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26755        let mut __tmp = BytesMut::new(bytes);
26756        #[allow(clippy::absurd_extreme_comparisons)]
26757        #[allow(unused_comparisons)]
26758        if __tmp.remaining() < Self::ENCODED_LEN {
26759            panic!(
26760                "buffer is too small (need {} bytes, but got {})",
26761                Self::ENCODED_LEN,
26762                __tmp.remaining(),
26763            )
26764        }
26765        __tmp.put_u64_le(self.time_usec);
26766        for val in &self.controls {
26767            __tmp.put_f32_le(*val);
26768        }
26769        __tmp.put_u8(self.group_mlx);
26770        __tmp.put_u8(self.target_system);
26771        __tmp.put_u8(self.target_component);
26772        if matches!(version, MavlinkVersion::V2) {
26773            let len = __tmp.len();
26774            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26775        } else {
26776            __tmp.len()
26777        }
26778    }
26779}
26780#[doc = "id: 82"]
26781#[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
26782#[derive(Debug, Clone, PartialEq)]
26783#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26784#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26785pub struct SET_ATTITUDE_TARGET_DATA {
26786    #[doc = "Timestamp (time since system boot)."]
26787    pub time_boot_ms: u32,
26788    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) from MAV_FRAME_LOCAL_NED to MAV_FRAME_BODY_FRD"]
26789    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26790    pub q: [f32; 4],
26791    #[doc = "Body roll rate"]
26792    pub body_roll_rate: f32,
26793    #[doc = "Body pitch rate"]
26794    pub body_pitch_rate: f32,
26795    #[doc = "Body yaw rate"]
26796    pub body_yaw_rate: f32,
26797    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
26798    pub thrust: f32,
26799    #[doc = "System ID"]
26800    pub target_system: u8,
26801    #[doc = "Component ID"]
26802    pub target_component: u8,
26803    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
26804    pub type_mask: AttitudeTargetTypemask,
26805    #[doc = "3D thrust setpoint in the body NED frame, normalized to -1 .. 1"]
26806    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26807    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26808    pub thrust_body: [f32; 3],
26809}
26810impl SET_ATTITUDE_TARGET_DATA {
26811    pub const ENCODED_LEN: usize = 51usize;
26812    pub const DEFAULT: Self = Self {
26813        time_boot_ms: 0_u32,
26814        q: [0.0_f32; 4usize],
26815        body_roll_rate: 0.0_f32,
26816        body_pitch_rate: 0.0_f32,
26817        body_yaw_rate: 0.0_f32,
26818        thrust: 0.0_f32,
26819        target_system: 0_u8,
26820        target_component: 0_u8,
26821        type_mask: AttitudeTargetTypemask::DEFAULT,
26822        thrust_body: [0.0_f32; 3usize],
26823    };
26824    #[cfg(feature = "arbitrary")]
26825    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26826        use arbitrary::{Arbitrary, Unstructured};
26827        let mut buf = [0u8; 1024];
26828        rng.fill_bytes(&mut buf);
26829        let mut unstructured = Unstructured::new(&buf);
26830        Self::arbitrary(&mut unstructured).unwrap_or_default()
26831    }
26832}
26833impl Default for SET_ATTITUDE_TARGET_DATA {
26834    fn default() -> Self {
26835        Self::DEFAULT.clone()
26836    }
26837}
26838impl MessageData for SET_ATTITUDE_TARGET_DATA {
26839    type Message = MavMessage;
26840    const ID: u32 = 82u32;
26841    const NAME: &'static str = "SET_ATTITUDE_TARGET";
26842    const EXTRA_CRC: u8 = 49u8;
26843    const ENCODED_LEN: usize = 51usize;
26844    fn deser(
26845        _version: MavlinkVersion,
26846        __input: &[u8],
26847    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26848        let avail_len = __input.len();
26849        let mut payload_buf = [0; Self::ENCODED_LEN];
26850        let mut buf = if avail_len < Self::ENCODED_LEN {
26851            payload_buf[0..avail_len].copy_from_slice(__input);
26852            Bytes::new(&payload_buf)
26853        } else {
26854            Bytes::new(__input)
26855        };
26856        let mut __struct = Self::default();
26857        __struct.time_boot_ms = buf.get_u32_le();
26858        for v in &mut __struct.q {
26859            let val = buf.get_f32_le();
26860            *v = val;
26861        }
26862        __struct.body_roll_rate = buf.get_f32_le();
26863        __struct.body_pitch_rate = buf.get_f32_le();
26864        __struct.body_yaw_rate = buf.get_f32_le();
26865        __struct.thrust = buf.get_f32_le();
26866        __struct.target_system = buf.get_u8();
26867        __struct.target_component = buf.get_u8();
26868        let tmp = buf.get_u8();
26869        __struct.type_mask = AttitudeTargetTypemask::from_bits(
26870            tmp & AttitudeTargetTypemask::all().bits(),
26871        )
26872        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
26873            flag_type: "AttitudeTargetTypemask",
26874            value: tmp as u32,
26875        })?;
26876        for v in &mut __struct.thrust_body {
26877            let val = buf.get_f32_le();
26878            *v = val;
26879        }
26880        Ok(__struct)
26881    }
26882    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26883        let mut __tmp = BytesMut::new(bytes);
26884        #[allow(clippy::absurd_extreme_comparisons)]
26885        #[allow(unused_comparisons)]
26886        if __tmp.remaining() < Self::ENCODED_LEN {
26887            panic!(
26888                "buffer is too small (need {} bytes, but got {})",
26889                Self::ENCODED_LEN,
26890                __tmp.remaining(),
26891            )
26892        }
26893        __tmp.put_u32_le(self.time_boot_ms);
26894        for val in &self.q {
26895            __tmp.put_f32_le(*val);
26896        }
26897        __tmp.put_f32_le(self.body_roll_rate);
26898        __tmp.put_f32_le(self.body_pitch_rate);
26899        __tmp.put_f32_le(self.body_yaw_rate);
26900        __tmp.put_f32_le(self.thrust);
26901        __tmp.put_u8(self.target_system);
26902        __tmp.put_u8(self.target_component);
26903        __tmp.put_u8(self.type_mask.bits());
26904        for val in &self.thrust_body {
26905            __tmp.put_f32_le(*val);
26906        }
26907        if matches!(version, MavlinkVersion::V2) {
26908            let len = __tmp.len();
26909            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26910        } else {
26911            __tmp.len()
26912        }
26913    }
26914}
26915#[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
26916#[doc = "id: 48"]
26917#[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
26918#[derive(Debug, Clone, PartialEq)]
26919#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26920#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26921pub struct SET_GPS_GLOBAL_ORIGIN_DATA {
26922    #[doc = "Latitude (WGS84)"]
26923    pub latitude: i32,
26924    #[doc = "Longitude (WGS84)"]
26925    pub longitude: i32,
26926    #[doc = "Altitude (MSL). Positive for up."]
26927    pub altitude: i32,
26928    #[doc = "System ID"]
26929    pub target_system: u8,
26930    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
26931    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26932    pub time_usec: u64,
26933}
26934impl SET_GPS_GLOBAL_ORIGIN_DATA {
26935    pub const ENCODED_LEN: usize = 21usize;
26936    pub const DEFAULT: Self = Self {
26937        latitude: 0_i32,
26938        longitude: 0_i32,
26939        altitude: 0_i32,
26940        target_system: 0_u8,
26941        time_usec: 0_u64,
26942    };
26943    #[cfg(feature = "arbitrary")]
26944    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26945        use arbitrary::{Arbitrary, Unstructured};
26946        let mut buf = [0u8; 1024];
26947        rng.fill_bytes(&mut buf);
26948        let mut unstructured = Unstructured::new(&buf);
26949        Self::arbitrary(&mut unstructured).unwrap_or_default()
26950    }
26951}
26952impl Default for SET_GPS_GLOBAL_ORIGIN_DATA {
26953    fn default() -> Self {
26954        Self::DEFAULT.clone()
26955    }
26956}
26957impl MessageData for SET_GPS_GLOBAL_ORIGIN_DATA {
26958    type Message = MavMessage;
26959    const ID: u32 = 48u32;
26960    const NAME: &'static str = "SET_GPS_GLOBAL_ORIGIN";
26961    const EXTRA_CRC: u8 = 41u8;
26962    const ENCODED_LEN: usize = 21usize;
26963    fn deser(
26964        _version: MavlinkVersion,
26965        __input: &[u8],
26966    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26967        let avail_len = __input.len();
26968        let mut payload_buf = [0; Self::ENCODED_LEN];
26969        let mut buf = if avail_len < Self::ENCODED_LEN {
26970            payload_buf[0..avail_len].copy_from_slice(__input);
26971            Bytes::new(&payload_buf)
26972        } else {
26973            Bytes::new(__input)
26974        };
26975        let mut __struct = Self::default();
26976        __struct.latitude = buf.get_i32_le();
26977        __struct.longitude = buf.get_i32_le();
26978        __struct.altitude = buf.get_i32_le();
26979        __struct.target_system = buf.get_u8();
26980        __struct.time_usec = buf.get_u64_le();
26981        Ok(__struct)
26982    }
26983    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26984        let mut __tmp = BytesMut::new(bytes);
26985        #[allow(clippy::absurd_extreme_comparisons)]
26986        #[allow(unused_comparisons)]
26987        if __tmp.remaining() < Self::ENCODED_LEN {
26988            panic!(
26989                "buffer is too small (need {} bytes, but got {})",
26990                Self::ENCODED_LEN,
26991                __tmp.remaining(),
26992            )
26993        }
26994        __tmp.put_i32_le(self.latitude);
26995        __tmp.put_i32_le(self.longitude);
26996        __tmp.put_i32_le(self.altitude);
26997        __tmp.put_u8(self.target_system);
26998        __tmp.put_u64_le(self.time_usec);
26999        if matches!(version, MavlinkVersion::V2) {
27000            let len = __tmp.len();
27001            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27002        } else {
27003            __tmp.len()
27004        }
27005    }
27006}
27007#[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
27008#[doc = "id: 243"]
27009#[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
27010#[derive(Debug, Clone, PartialEq)]
27011#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27012#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27013pub struct SET_HOME_POSITION_DATA {
27014    #[doc = "Latitude (WGS84)"]
27015    pub latitude: i32,
27016    #[doc = "Longitude (WGS84)"]
27017    pub longitude: i32,
27018    #[doc = "Altitude (MSL). Positive for up."]
27019    pub altitude: i32,
27020    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
27021    pub x: f32,
27022    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
27023    pub y: f32,
27024    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
27025    pub z: f32,
27026    #[doc = "World to surface normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground"]
27027    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27028    pub q: [f32; 4],
27029    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
27030    pub approach_x: f32,
27031    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
27032    pub approach_y: f32,
27033    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
27034    pub approach_z: f32,
27035    #[doc = "System ID."]
27036    pub target_system: u8,
27037    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27038    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27039    pub time_usec: u64,
27040}
27041impl SET_HOME_POSITION_DATA {
27042    pub const ENCODED_LEN: usize = 61usize;
27043    pub const DEFAULT: Self = Self {
27044        latitude: 0_i32,
27045        longitude: 0_i32,
27046        altitude: 0_i32,
27047        x: 0.0_f32,
27048        y: 0.0_f32,
27049        z: 0.0_f32,
27050        q: [0.0_f32; 4usize],
27051        approach_x: 0.0_f32,
27052        approach_y: 0.0_f32,
27053        approach_z: 0.0_f32,
27054        target_system: 0_u8,
27055        time_usec: 0_u64,
27056    };
27057    #[cfg(feature = "arbitrary")]
27058    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27059        use arbitrary::{Arbitrary, Unstructured};
27060        let mut buf = [0u8; 1024];
27061        rng.fill_bytes(&mut buf);
27062        let mut unstructured = Unstructured::new(&buf);
27063        Self::arbitrary(&mut unstructured).unwrap_or_default()
27064    }
27065}
27066impl Default for SET_HOME_POSITION_DATA {
27067    fn default() -> Self {
27068        Self::DEFAULT.clone()
27069    }
27070}
27071impl MessageData for SET_HOME_POSITION_DATA {
27072    type Message = MavMessage;
27073    const ID: u32 = 243u32;
27074    const NAME: &'static str = "SET_HOME_POSITION";
27075    const EXTRA_CRC: u8 = 85u8;
27076    const ENCODED_LEN: usize = 61usize;
27077    fn deser(
27078        _version: MavlinkVersion,
27079        __input: &[u8],
27080    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27081        let avail_len = __input.len();
27082        let mut payload_buf = [0; Self::ENCODED_LEN];
27083        let mut buf = if avail_len < Self::ENCODED_LEN {
27084            payload_buf[0..avail_len].copy_from_slice(__input);
27085            Bytes::new(&payload_buf)
27086        } else {
27087            Bytes::new(__input)
27088        };
27089        let mut __struct = Self::default();
27090        __struct.latitude = buf.get_i32_le();
27091        __struct.longitude = buf.get_i32_le();
27092        __struct.altitude = buf.get_i32_le();
27093        __struct.x = buf.get_f32_le();
27094        __struct.y = buf.get_f32_le();
27095        __struct.z = buf.get_f32_le();
27096        for v in &mut __struct.q {
27097            let val = buf.get_f32_le();
27098            *v = val;
27099        }
27100        __struct.approach_x = buf.get_f32_le();
27101        __struct.approach_y = buf.get_f32_le();
27102        __struct.approach_z = buf.get_f32_le();
27103        __struct.target_system = buf.get_u8();
27104        __struct.time_usec = buf.get_u64_le();
27105        Ok(__struct)
27106    }
27107    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27108        let mut __tmp = BytesMut::new(bytes);
27109        #[allow(clippy::absurd_extreme_comparisons)]
27110        #[allow(unused_comparisons)]
27111        if __tmp.remaining() < Self::ENCODED_LEN {
27112            panic!(
27113                "buffer is too small (need {} bytes, but got {})",
27114                Self::ENCODED_LEN,
27115                __tmp.remaining(),
27116            )
27117        }
27118        __tmp.put_i32_le(self.latitude);
27119        __tmp.put_i32_le(self.longitude);
27120        __tmp.put_i32_le(self.altitude);
27121        __tmp.put_f32_le(self.x);
27122        __tmp.put_f32_le(self.y);
27123        __tmp.put_f32_le(self.z);
27124        for val in &self.q {
27125            __tmp.put_f32_le(*val);
27126        }
27127        __tmp.put_f32_le(self.approach_x);
27128        __tmp.put_f32_le(self.approach_y);
27129        __tmp.put_f32_le(self.approach_z);
27130        __tmp.put_u8(self.target_system);
27131        __tmp.put_u64_le(self.time_usec);
27132        if matches!(version, MavlinkVersion::V2) {
27133            let len = __tmp.len();
27134            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27135        } else {
27136            __tmp.len()
27137        }
27138    }
27139}
27140#[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
27141#[doc = "id: 11"]
27142#[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
27143#[derive(Debug, Clone, PartialEq)]
27144#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27145#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27146pub struct SET_MODE_DATA {
27147    #[doc = "The new autopilot-specific mode. This field can be ignored by an autopilot."]
27148    pub custom_mode: u32,
27149    #[doc = "The system setting the mode"]
27150    pub target_system: u8,
27151    #[doc = "The new base mode."]
27152    pub base_mode: MavMode,
27153}
27154impl SET_MODE_DATA {
27155    pub const ENCODED_LEN: usize = 6usize;
27156    pub const DEFAULT: Self = Self {
27157        custom_mode: 0_u32,
27158        target_system: 0_u8,
27159        base_mode: MavMode::DEFAULT,
27160    };
27161    #[cfg(feature = "arbitrary")]
27162    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27163        use arbitrary::{Arbitrary, Unstructured};
27164        let mut buf = [0u8; 1024];
27165        rng.fill_bytes(&mut buf);
27166        let mut unstructured = Unstructured::new(&buf);
27167        Self::arbitrary(&mut unstructured).unwrap_or_default()
27168    }
27169}
27170impl Default for SET_MODE_DATA {
27171    fn default() -> Self {
27172        Self::DEFAULT.clone()
27173    }
27174}
27175impl MessageData for SET_MODE_DATA {
27176    type Message = MavMessage;
27177    const ID: u32 = 11u32;
27178    const NAME: &'static str = "SET_MODE";
27179    const EXTRA_CRC: u8 = 89u8;
27180    const ENCODED_LEN: usize = 6usize;
27181    fn deser(
27182        _version: MavlinkVersion,
27183        __input: &[u8],
27184    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27185        let avail_len = __input.len();
27186        let mut payload_buf = [0; Self::ENCODED_LEN];
27187        let mut buf = if avail_len < Self::ENCODED_LEN {
27188            payload_buf[0..avail_len].copy_from_slice(__input);
27189            Bytes::new(&payload_buf)
27190        } else {
27191            Bytes::new(__input)
27192        };
27193        let mut __struct = Self::default();
27194        __struct.custom_mode = buf.get_u32_le();
27195        __struct.target_system = buf.get_u8();
27196        let tmp = buf.get_u8();
27197        __struct.base_mode =
27198            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27199                enum_type: "MavMode",
27200                value: tmp as u32,
27201            })?;
27202        Ok(__struct)
27203    }
27204    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27205        let mut __tmp = BytesMut::new(bytes);
27206        #[allow(clippy::absurd_extreme_comparisons)]
27207        #[allow(unused_comparisons)]
27208        if __tmp.remaining() < Self::ENCODED_LEN {
27209            panic!(
27210                "buffer is too small (need {} bytes, but got {})",
27211                Self::ENCODED_LEN,
27212                __tmp.remaining(),
27213            )
27214        }
27215        __tmp.put_u32_le(self.custom_mode);
27216        __tmp.put_u8(self.target_system);
27217        __tmp.put_u8(self.base_mode as u8);
27218        if matches!(version, MavlinkVersion::V2) {
27219            let len = __tmp.len();
27220            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27221        } else {
27222            __tmp.len()
27223        }
27224    }
27225}
27226#[doc = "id: 86"]
27227#[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
27228#[derive(Debug, Clone, PartialEq)]
27229#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27230#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27231pub struct SET_POSITION_TARGET_GLOBAL_INT_DATA {
27232    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
27233    pub time_boot_ms: u32,
27234    #[doc = "Latitude in WGS84 frame"]
27235    pub lat_int: i32,
27236    #[doc = "Longitude in WGS84 frame"]
27237    pub lon_int: i32,
27238    #[doc = "Altitude (MSL, Relative to home, or AGL - depending on frame)"]
27239    pub alt: f32,
27240    #[doc = "X velocity in NED frame"]
27241    pub vx: f32,
27242    #[doc = "Y velocity in NED frame"]
27243    pub vy: f32,
27244    #[doc = "Z velocity in NED frame"]
27245    pub vz: f32,
27246    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
27247    pub afx: f32,
27248    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
27249    pub afy: f32,
27250    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
27251    pub afz: f32,
27252    #[doc = "yaw setpoint"]
27253    pub yaw: f32,
27254    #[doc = "yaw rate setpoint"]
27255    pub yaw_rate: f32,
27256    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
27257    pub type_mask: PositionTargetTypemask,
27258    #[doc = "System ID"]
27259    pub target_system: u8,
27260    #[doc = "Component ID"]
27261    pub target_component: u8,
27262    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
27263    pub coordinate_frame: MavFrame,
27264}
27265impl SET_POSITION_TARGET_GLOBAL_INT_DATA {
27266    pub const ENCODED_LEN: usize = 53usize;
27267    pub const DEFAULT: Self = Self {
27268        time_boot_ms: 0_u32,
27269        lat_int: 0_i32,
27270        lon_int: 0_i32,
27271        alt: 0.0_f32,
27272        vx: 0.0_f32,
27273        vy: 0.0_f32,
27274        vz: 0.0_f32,
27275        afx: 0.0_f32,
27276        afy: 0.0_f32,
27277        afz: 0.0_f32,
27278        yaw: 0.0_f32,
27279        yaw_rate: 0.0_f32,
27280        type_mask: PositionTargetTypemask::DEFAULT,
27281        target_system: 0_u8,
27282        target_component: 0_u8,
27283        coordinate_frame: MavFrame::DEFAULT,
27284    };
27285    #[cfg(feature = "arbitrary")]
27286    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27287        use arbitrary::{Arbitrary, Unstructured};
27288        let mut buf = [0u8; 1024];
27289        rng.fill_bytes(&mut buf);
27290        let mut unstructured = Unstructured::new(&buf);
27291        Self::arbitrary(&mut unstructured).unwrap_or_default()
27292    }
27293}
27294impl Default for SET_POSITION_TARGET_GLOBAL_INT_DATA {
27295    fn default() -> Self {
27296        Self::DEFAULT.clone()
27297    }
27298}
27299impl MessageData for SET_POSITION_TARGET_GLOBAL_INT_DATA {
27300    type Message = MavMessage;
27301    const ID: u32 = 86u32;
27302    const NAME: &'static str = "SET_POSITION_TARGET_GLOBAL_INT";
27303    const EXTRA_CRC: u8 = 5u8;
27304    const ENCODED_LEN: usize = 53usize;
27305    fn deser(
27306        _version: MavlinkVersion,
27307        __input: &[u8],
27308    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27309        let avail_len = __input.len();
27310        let mut payload_buf = [0; Self::ENCODED_LEN];
27311        let mut buf = if avail_len < Self::ENCODED_LEN {
27312            payload_buf[0..avail_len].copy_from_slice(__input);
27313            Bytes::new(&payload_buf)
27314        } else {
27315            Bytes::new(__input)
27316        };
27317        let mut __struct = Self::default();
27318        __struct.time_boot_ms = buf.get_u32_le();
27319        __struct.lat_int = buf.get_i32_le();
27320        __struct.lon_int = buf.get_i32_le();
27321        __struct.alt = buf.get_f32_le();
27322        __struct.vx = buf.get_f32_le();
27323        __struct.vy = buf.get_f32_le();
27324        __struct.vz = buf.get_f32_le();
27325        __struct.afx = buf.get_f32_le();
27326        __struct.afy = buf.get_f32_le();
27327        __struct.afz = buf.get_f32_le();
27328        __struct.yaw = buf.get_f32_le();
27329        __struct.yaw_rate = buf.get_f32_le();
27330        let tmp = buf.get_u16_le();
27331        __struct.type_mask = PositionTargetTypemask::from_bits(
27332            tmp & PositionTargetTypemask::all().bits(),
27333        )
27334        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
27335            flag_type: "PositionTargetTypemask",
27336            value: tmp as u32,
27337        })?;
27338        __struct.target_system = buf.get_u8();
27339        __struct.target_component = buf.get_u8();
27340        let tmp = buf.get_u8();
27341        __struct.coordinate_frame =
27342            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27343                enum_type: "MavFrame",
27344                value: tmp as u32,
27345            })?;
27346        Ok(__struct)
27347    }
27348    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27349        let mut __tmp = BytesMut::new(bytes);
27350        #[allow(clippy::absurd_extreme_comparisons)]
27351        #[allow(unused_comparisons)]
27352        if __tmp.remaining() < Self::ENCODED_LEN {
27353            panic!(
27354                "buffer is too small (need {} bytes, but got {})",
27355                Self::ENCODED_LEN,
27356                __tmp.remaining(),
27357            )
27358        }
27359        __tmp.put_u32_le(self.time_boot_ms);
27360        __tmp.put_i32_le(self.lat_int);
27361        __tmp.put_i32_le(self.lon_int);
27362        __tmp.put_f32_le(self.alt);
27363        __tmp.put_f32_le(self.vx);
27364        __tmp.put_f32_le(self.vy);
27365        __tmp.put_f32_le(self.vz);
27366        __tmp.put_f32_le(self.afx);
27367        __tmp.put_f32_le(self.afy);
27368        __tmp.put_f32_le(self.afz);
27369        __tmp.put_f32_le(self.yaw);
27370        __tmp.put_f32_le(self.yaw_rate);
27371        __tmp.put_u16_le(self.type_mask.bits());
27372        __tmp.put_u8(self.target_system);
27373        __tmp.put_u8(self.target_component);
27374        __tmp.put_u8(self.coordinate_frame as u8);
27375        if matches!(version, MavlinkVersion::V2) {
27376            let len = __tmp.len();
27377            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27378        } else {
27379            __tmp.len()
27380        }
27381    }
27382}
27383#[doc = "id: 84"]
27384#[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
27385#[derive(Debug, Clone, PartialEq)]
27386#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27387#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27388pub struct SET_POSITION_TARGET_LOCAL_NED_DATA {
27389    #[doc = "Timestamp (time since system boot)."]
27390    pub time_boot_ms: u32,
27391    #[doc = "X Position in NED frame"]
27392    pub x: f32,
27393    #[doc = "Y Position in NED frame"]
27394    pub y: f32,
27395    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
27396    pub z: f32,
27397    #[doc = "X velocity in NED frame"]
27398    pub vx: f32,
27399    #[doc = "Y velocity in NED frame"]
27400    pub vy: f32,
27401    #[doc = "Z velocity in NED frame"]
27402    pub vz: f32,
27403    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
27404    pub afx: f32,
27405    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
27406    pub afy: f32,
27407    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
27408    pub afz: f32,
27409    #[doc = "yaw setpoint"]
27410    pub yaw: f32,
27411    #[doc = "yaw rate setpoint"]
27412    pub yaw_rate: f32,
27413    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
27414    pub type_mask: PositionTargetTypemask,
27415    #[doc = "System ID"]
27416    pub target_system: u8,
27417    #[doc = "Component ID"]
27418    pub target_component: u8,
27419    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
27420    pub coordinate_frame: MavFrame,
27421}
27422impl SET_POSITION_TARGET_LOCAL_NED_DATA {
27423    pub const ENCODED_LEN: usize = 53usize;
27424    pub const DEFAULT: Self = Self {
27425        time_boot_ms: 0_u32,
27426        x: 0.0_f32,
27427        y: 0.0_f32,
27428        z: 0.0_f32,
27429        vx: 0.0_f32,
27430        vy: 0.0_f32,
27431        vz: 0.0_f32,
27432        afx: 0.0_f32,
27433        afy: 0.0_f32,
27434        afz: 0.0_f32,
27435        yaw: 0.0_f32,
27436        yaw_rate: 0.0_f32,
27437        type_mask: PositionTargetTypemask::DEFAULT,
27438        target_system: 0_u8,
27439        target_component: 0_u8,
27440        coordinate_frame: MavFrame::DEFAULT,
27441    };
27442    #[cfg(feature = "arbitrary")]
27443    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27444        use arbitrary::{Arbitrary, Unstructured};
27445        let mut buf = [0u8; 1024];
27446        rng.fill_bytes(&mut buf);
27447        let mut unstructured = Unstructured::new(&buf);
27448        Self::arbitrary(&mut unstructured).unwrap_or_default()
27449    }
27450}
27451impl Default for SET_POSITION_TARGET_LOCAL_NED_DATA {
27452    fn default() -> Self {
27453        Self::DEFAULT.clone()
27454    }
27455}
27456impl MessageData for SET_POSITION_TARGET_LOCAL_NED_DATA {
27457    type Message = MavMessage;
27458    const ID: u32 = 84u32;
27459    const NAME: &'static str = "SET_POSITION_TARGET_LOCAL_NED";
27460    const EXTRA_CRC: u8 = 143u8;
27461    const ENCODED_LEN: usize = 53usize;
27462    fn deser(
27463        _version: MavlinkVersion,
27464        __input: &[u8],
27465    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27466        let avail_len = __input.len();
27467        let mut payload_buf = [0; Self::ENCODED_LEN];
27468        let mut buf = if avail_len < Self::ENCODED_LEN {
27469            payload_buf[0..avail_len].copy_from_slice(__input);
27470            Bytes::new(&payload_buf)
27471        } else {
27472            Bytes::new(__input)
27473        };
27474        let mut __struct = Self::default();
27475        __struct.time_boot_ms = buf.get_u32_le();
27476        __struct.x = buf.get_f32_le();
27477        __struct.y = buf.get_f32_le();
27478        __struct.z = buf.get_f32_le();
27479        __struct.vx = buf.get_f32_le();
27480        __struct.vy = buf.get_f32_le();
27481        __struct.vz = buf.get_f32_le();
27482        __struct.afx = buf.get_f32_le();
27483        __struct.afy = buf.get_f32_le();
27484        __struct.afz = buf.get_f32_le();
27485        __struct.yaw = buf.get_f32_le();
27486        __struct.yaw_rate = buf.get_f32_le();
27487        let tmp = buf.get_u16_le();
27488        __struct.type_mask = PositionTargetTypemask::from_bits(
27489            tmp & PositionTargetTypemask::all().bits(),
27490        )
27491        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
27492            flag_type: "PositionTargetTypemask",
27493            value: tmp as u32,
27494        })?;
27495        __struct.target_system = buf.get_u8();
27496        __struct.target_component = buf.get_u8();
27497        let tmp = buf.get_u8();
27498        __struct.coordinate_frame =
27499            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27500                enum_type: "MavFrame",
27501                value: tmp as u32,
27502            })?;
27503        Ok(__struct)
27504    }
27505    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27506        let mut __tmp = BytesMut::new(bytes);
27507        #[allow(clippy::absurd_extreme_comparisons)]
27508        #[allow(unused_comparisons)]
27509        if __tmp.remaining() < Self::ENCODED_LEN {
27510            panic!(
27511                "buffer is too small (need {} bytes, but got {})",
27512                Self::ENCODED_LEN,
27513                __tmp.remaining(),
27514            )
27515        }
27516        __tmp.put_u32_le(self.time_boot_ms);
27517        __tmp.put_f32_le(self.x);
27518        __tmp.put_f32_le(self.y);
27519        __tmp.put_f32_le(self.z);
27520        __tmp.put_f32_le(self.vx);
27521        __tmp.put_f32_le(self.vy);
27522        __tmp.put_f32_le(self.vz);
27523        __tmp.put_f32_le(self.afx);
27524        __tmp.put_f32_le(self.afy);
27525        __tmp.put_f32_le(self.afz);
27526        __tmp.put_f32_le(self.yaw);
27527        __tmp.put_f32_le(self.yaw_rate);
27528        __tmp.put_u16_le(self.type_mask.bits());
27529        __tmp.put_u8(self.target_system);
27530        __tmp.put_u8(self.target_component);
27531        __tmp.put_u8(self.coordinate_frame as u8);
27532        if matches!(version, MavlinkVersion::V2) {
27533            let len = __tmp.len();
27534            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27535        } else {
27536            __tmp.len()
27537        }
27538    }
27539}
27540#[doc = "id: 108"]
27541#[doc = "Status of simulation environment, if used."]
27542#[derive(Debug, Clone, PartialEq)]
27543#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27544#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27545pub struct SIM_STATE_DATA {
27546    #[doc = "True attitude quaternion component 1, w (1 in null-rotation)"]
27547    pub q1: f32,
27548    #[doc = "True attitude quaternion component 2, x (0 in null-rotation)"]
27549    pub q2: f32,
27550    #[doc = "True attitude quaternion component 3, y (0 in null-rotation)"]
27551    pub q3: f32,
27552    #[doc = "True attitude quaternion component 4, z (0 in null-rotation)"]
27553    pub q4: f32,
27554    #[doc = "Attitude roll expressed as Euler angles, not recommended except for human-readable outputs"]
27555    pub roll: f32,
27556    #[doc = "Attitude pitch expressed as Euler angles, not recommended except for human-readable outputs"]
27557    pub pitch: f32,
27558    #[doc = "Attitude yaw expressed as Euler angles, not recommended except for human-readable outputs"]
27559    pub yaw: f32,
27560    #[doc = "X acceleration"]
27561    pub xacc: f32,
27562    #[doc = "Y acceleration"]
27563    pub yacc: f32,
27564    #[doc = "Z acceleration"]
27565    pub zacc: f32,
27566    #[doc = "Angular speed around X axis"]
27567    pub xgyro: f32,
27568    #[doc = "Angular speed around Y axis"]
27569    pub ygyro: f32,
27570    #[doc = "Angular speed around Z axis"]
27571    pub zgyro: f32,
27572    #[doc = "Latitude (lower precision). Both this and the lat_int field should be set."]
27573    pub lat: f32,
27574    #[doc = "Longitude (lower precision). Both this and the lon_int field should be set."]
27575    pub lon: f32,
27576    #[doc = "Altitude"]
27577    pub alt: f32,
27578    #[doc = "Horizontal position standard deviation"]
27579    pub std_dev_horz: f32,
27580    #[doc = "Vertical position standard deviation"]
27581    pub std_dev_vert: f32,
27582    #[doc = "True velocity in north direction in earth-fixed NED frame"]
27583    pub vn: f32,
27584    #[doc = "True velocity in east direction in earth-fixed NED frame"]
27585    pub ve: f32,
27586    #[doc = "True velocity in down direction in earth-fixed NED frame"]
27587    pub vd: f32,
27588    #[doc = "Latitude (higher precision). If 0, recipients should use the lat field value (otherwise this field is preferred)."]
27589    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27590    pub lat_int: i32,
27591    #[doc = "Longitude (higher precision). If 0, recipients should use the lon field value (otherwise this field is preferred)."]
27592    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27593    pub lon_int: i32,
27594}
27595impl SIM_STATE_DATA {
27596    pub const ENCODED_LEN: usize = 92usize;
27597    pub const DEFAULT: Self = Self {
27598        q1: 0.0_f32,
27599        q2: 0.0_f32,
27600        q3: 0.0_f32,
27601        q4: 0.0_f32,
27602        roll: 0.0_f32,
27603        pitch: 0.0_f32,
27604        yaw: 0.0_f32,
27605        xacc: 0.0_f32,
27606        yacc: 0.0_f32,
27607        zacc: 0.0_f32,
27608        xgyro: 0.0_f32,
27609        ygyro: 0.0_f32,
27610        zgyro: 0.0_f32,
27611        lat: 0.0_f32,
27612        lon: 0.0_f32,
27613        alt: 0.0_f32,
27614        std_dev_horz: 0.0_f32,
27615        std_dev_vert: 0.0_f32,
27616        vn: 0.0_f32,
27617        ve: 0.0_f32,
27618        vd: 0.0_f32,
27619        lat_int: 0_i32,
27620        lon_int: 0_i32,
27621    };
27622    #[cfg(feature = "arbitrary")]
27623    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27624        use arbitrary::{Arbitrary, Unstructured};
27625        let mut buf = [0u8; 1024];
27626        rng.fill_bytes(&mut buf);
27627        let mut unstructured = Unstructured::new(&buf);
27628        Self::arbitrary(&mut unstructured).unwrap_or_default()
27629    }
27630}
27631impl Default for SIM_STATE_DATA {
27632    fn default() -> Self {
27633        Self::DEFAULT.clone()
27634    }
27635}
27636impl MessageData for SIM_STATE_DATA {
27637    type Message = MavMessage;
27638    const ID: u32 = 108u32;
27639    const NAME: &'static str = "SIM_STATE";
27640    const EXTRA_CRC: u8 = 32u8;
27641    const ENCODED_LEN: usize = 92usize;
27642    fn deser(
27643        _version: MavlinkVersion,
27644        __input: &[u8],
27645    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27646        let avail_len = __input.len();
27647        let mut payload_buf = [0; Self::ENCODED_LEN];
27648        let mut buf = if avail_len < Self::ENCODED_LEN {
27649            payload_buf[0..avail_len].copy_from_slice(__input);
27650            Bytes::new(&payload_buf)
27651        } else {
27652            Bytes::new(__input)
27653        };
27654        let mut __struct = Self::default();
27655        __struct.q1 = buf.get_f32_le();
27656        __struct.q2 = buf.get_f32_le();
27657        __struct.q3 = buf.get_f32_le();
27658        __struct.q4 = buf.get_f32_le();
27659        __struct.roll = buf.get_f32_le();
27660        __struct.pitch = buf.get_f32_le();
27661        __struct.yaw = buf.get_f32_le();
27662        __struct.xacc = buf.get_f32_le();
27663        __struct.yacc = buf.get_f32_le();
27664        __struct.zacc = buf.get_f32_le();
27665        __struct.xgyro = buf.get_f32_le();
27666        __struct.ygyro = buf.get_f32_le();
27667        __struct.zgyro = buf.get_f32_le();
27668        __struct.lat = buf.get_f32_le();
27669        __struct.lon = buf.get_f32_le();
27670        __struct.alt = buf.get_f32_le();
27671        __struct.std_dev_horz = buf.get_f32_le();
27672        __struct.std_dev_vert = buf.get_f32_le();
27673        __struct.vn = buf.get_f32_le();
27674        __struct.ve = buf.get_f32_le();
27675        __struct.vd = buf.get_f32_le();
27676        __struct.lat_int = buf.get_i32_le();
27677        __struct.lon_int = buf.get_i32_le();
27678        Ok(__struct)
27679    }
27680    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27681        let mut __tmp = BytesMut::new(bytes);
27682        #[allow(clippy::absurd_extreme_comparisons)]
27683        #[allow(unused_comparisons)]
27684        if __tmp.remaining() < Self::ENCODED_LEN {
27685            panic!(
27686                "buffer is too small (need {} bytes, but got {})",
27687                Self::ENCODED_LEN,
27688                __tmp.remaining(),
27689            )
27690        }
27691        __tmp.put_f32_le(self.q1);
27692        __tmp.put_f32_le(self.q2);
27693        __tmp.put_f32_le(self.q3);
27694        __tmp.put_f32_le(self.q4);
27695        __tmp.put_f32_le(self.roll);
27696        __tmp.put_f32_le(self.pitch);
27697        __tmp.put_f32_le(self.yaw);
27698        __tmp.put_f32_le(self.xacc);
27699        __tmp.put_f32_le(self.yacc);
27700        __tmp.put_f32_le(self.zacc);
27701        __tmp.put_f32_le(self.xgyro);
27702        __tmp.put_f32_le(self.ygyro);
27703        __tmp.put_f32_le(self.zgyro);
27704        __tmp.put_f32_le(self.lat);
27705        __tmp.put_f32_le(self.lon);
27706        __tmp.put_f32_le(self.alt);
27707        __tmp.put_f32_le(self.std_dev_horz);
27708        __tmp.put_f32_le(self.std_dev_vert);
27709        __tmp.put_f32_le(self.vn);
27710        __tmp.put_f32_le(self.ve);
27711        __tmp.put_f32_le(self.vd);
27712        __tmp.put_i32_le(self.lat_int);
27713        __tmp.put_i32_le(self.lon_int);
27714        if matches!(version, MavlinkVersion::V2) {
27715            let len = __tmp.len();
27716            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27717        } else {
27718            __tmp.len()
27719        }
27720    }
27721}
27722#[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
27723#[doc = "id: 370"]
27724#[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
27725#[derive(Debug, Clone, PartialEq)]
27726#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27727#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27728pub struct SMART_BATTERY_INFO_DATA {
27729    #[doc = "Capacity when full according to manufacturer, -1: field not provided."]
27730    pub capacity_full_specification: i32,
27731    #[doc = "Capacity when full (accounting for battery degradation), -1: field not provided."]
27732    pub capacity_full: i32,
27733    #[doc = "Charge/discharge cycle count. UINT16_MAX: field not provided."]
27734    pub cycle_count: u16,
27735    #[doc = "Battery weight. 0: field not provided."]
27736    pub weight: u16,
27737    #[doc = "Minimum per-cell voltage when discharging. If not supplied set to UINT16_MAX value."]
27738    pub discharge_minimum_voltage: u16,
27739    #[doc = "Minimum per-cell voltage when charging. If not supplied set to UINT16_MAX value."]
27740    pub charging_minimum_voltage: u16,
27741    #[doc = "Minimum per-cell voltage when resting. If not supplied set to UINT16_MAX value."]
27742    pub resting_minimum_voltage: u16,
27743    #[doc = "Battery ID"]
27744    pub id: u8,
27745    #[doc = "Function of the battery"]
27746    pub battery_function: MavBatteryFunction,
27747    #[doc = "Type (chemistry) of the battery"]
27748    pub mavtype: MavBatteryType,
27749    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
27750    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27751    pub serial_number: [u8; 16],
27752    #[doc = "Static device name in ASCII characters, 0 terminated. All 0: field not provided. Encode as manufacturer name then product name separated using an underscore."]
27753    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27754    pub device_name: [u8; 50],
27755    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
27756    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27757    pub charging_maximum_voltage: u16,
27758    #[doc = "Number of battery cells in series. 0: field not provided."]
27759    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27760    pub cells_in_series: u8,
27761    #[doc = "Maximum pack discharge current. 0: field not provided."]
27762    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27763    pub discharge_maximum_current: u32,
27764    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
27765    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27766    pub discharge_maximum_burst_current: u32,
27767    #[doc = "Manufacture date (DD/MM/YYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
27768    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27769    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27770    pub manufacture_date: [u8; 11],
27771}
27772impl SMART_BATTERY_INFO_DATA {
27773    pub const ENCODED_LEN: usize = 109usize;
27774    pub const DEFAULT: Self = Self {
27775        capacity_full_specification: 0_i32,
27776        capacity_full: 0_i32,
27777        cycle_count: 0_u16,
27778        weight: 0_u16,
27779        discharge_minimum_voltage: 0_u16,
27780        charging_minimum_voltage: 0_u16,
27781        resting_minimum_voltage: 0_u16,
27782        id: 0_u8,
27783        battery_function: MavBatteryFunction::DEFAULT,
27784        mavtype: MavBatteryType::DEFAULT,
27785        serial_number: [0_u8; 16usize],
27786        device_name: [0_u8; 50usize],
27787        charging_maximum_voltage: 0_u16,
27788        cells_in_series: 0_u8,
27789        discharge_maximum_current: 0_u32,
27790        discharge_maximum_burst_current: 0_u32,
27791        manufacture_date: [0_u8; 11usize],
27792    };
27793    #[cfg(feature = "arbitrary")]
27794    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27795        use arbitrary::{Arbitrary, Unstructured};
27796        let mut buf = [0u8; 1024];
27797        rng.fill_bytes(&mut buf);
27798        let mut unstructured = Unstructured::new(&buf);
27799        Self::arbitrary(&mut unstructured).unwrap_or_default()
27800    }
27801}
27802impl Default for SMART_BATTERY_INFO_DATA {
27803    fn default() -> Self {
27804        Self::DEFAULT.clone()
27805    }
27806}
27807impl MessageData for SMART_BATTERY_INFO_DATA {
27808    type Message = MavMessage;
27809    const ID: u32 = 370u32;
27810    const NAME: &'static str = "SMART_BATTERY_INFO";
27811    const EXTRA_CRC: u8 = 75u8;
27812    const ENCODED_LEN: usize = 109usize;
27813    fn deser(
27814        _version: MavlinkVersion,
27815        __input: &[u8],
27816    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27817        let avail_len = __input.len();
27818        let mut payload_buf = [0; Self::ENCODED_LEN];
27819        let mut buf = if avail_len < Self::ENCODED_LEN {
27820            payload_buf[0..avail_len].copy_from_slice(__input);
27821            Bytes::new(&payload_buf)
27822        } else {
27823            Bytes::new(__input)
27824        };
27825        let mut __struct = Self::default();
27826        __struct.capacity_full_specification = buf.get_i32_le();
27827        __struct.capacity_full = buf.get_i32_le();
27828        __struct.cycle_count = buf.get_u16_le();
27829        __struct.weight = buf.get_u16_le();
27830        __struct.discharge_minimum_voltage = buf.get_u16_le();
27831        __struct.charging_minimum_voltage = buf.get_u16_le();
27832        __struct.resting_minimum_voltage = buf.get_u16_le();
27833        __struct.id = buf.get_u8();
27834        let tmp = buf.get_u8();
27835        __struct.battery_function =
27836            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27837                enum_type: "MavBatteryFunction",
27838                value: tmp as u32,
27839            })?;
27840        let tmp = buf.get_u8();
27841        __struct.mavtype =
27842            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27843                enum_type: "MavBatteryType",
27844                value: tmp as u32,
27845            })?;
27846        for v in &mut __struct.serial_number {
27847            let val = buf.get_u8();
27848            *v = val;
27849        }
27850        for v in &mut __struct.device_name {
27851            let val = buf.get_u8();
27852            *v = val;
27853        }
27854        __struct.charging_maximum_voltage = buf.get_u16_le();
27855        __struct.cells_in_series = buf.get_u8();
27856        __struct.discharge_maximum_current = buf.get_u32_le();
27857        __struct.discharge_maximum_burst_current = buf.get_u32_le();
27858        for v in &mut __struct.manufacture_date {
27859            let val = buf.get_u8();
27860            *v = val;
27861        }
27862        Ok(__struct)
27863    }
27864    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27865        let mut __tmp = BytesMut::new(bytes);
27866        #[allow(clippy::absurd_extreme_comparisons)]
27867        #[allow(unused_comparisons)]
27868        if __tmp.remaining() < Self::ENCODED_LEN {
27869            panic!(
27870                "buffer is too small (need {} bytes, but got {})",
27871                Self::ENCODED_LEN,
27872                __tmp.remaining(),
27873            )
27874        }
27875        __tmp.put_i32_le(self.capacity_full_specification);
27876        __tmp.put_i32_le(self.capacity_full);
27877        __tmp.put_u16_le(self.cycle_count);
27878        __tmp.put_u16_le(self.weight);
27879        __tmp.put_u16_le(self.discharge_minimum_voltage);
27880        __tmp.put_u16_le(self.charging_minimum_voltage);
27881        __tmp.put_u16_le(self.resting_minimum_voltage);
27882        __tmp.put_u8(self.id);
27883        __tmp.put_u8(self.battery_function as u8);
27884        __tmp.put_u8(self.mavtype as u8);
27885        for val in &self.serial_number {
27886            __tmp.put_u8(*val);
27887        }
27888        for val in &self.device_name {
27889            __tmp.put_u8(*val);
27890        }
27891        __tmp.put_u16_le(self.charging_maximum_voltage);
27892        __tmp.put_u8(self.cells_in_series);
27893        __tmp.put_u32_le(self.discharge_maximum_current);
27894        __tmp.put_u32_le(self.discharge_maximum_burst_current);
27895        for val in &self.manufacture_date {
27896            __tmp.put_u8(*val);
27897        }
27898        if matches!(version, MavlinkVersion::V2) {
27899            let len = __tmp.len();
27900            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27901        } else {
27902            __tmp.len()
27903        }
27904    }
27905}
27906#[doc = "id: 253"]
27907#[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
27908#[derive(Debug, Clone, PartialEq)]
27909#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27910#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27911pub struct STATUSTEXT_DATA {
27912    #[doc = "Severity of status. Relies on the definitions within RFC-5424."]
27913    pub severity: MavSeverity,
27914    #[doc = "Status text message, without null termination character"]
27915    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27916    pub text: [u8; 50],
27917    #[doc = "Unique (opaque) identifier for this statustext message.  May be used to reassemble a logical long-statustext message from a sequence of chunks.  A value of zero indicates this is the only chunk in the sequence and the message can be emitted immediately."]
27918    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27919    pub id: u16,
27920    #[doc = "This chunk's sequence number; indexing is from zero.  Any null character in the text field is taken to mean this was the last chunk."]
27921    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27922    pub chunk_seq: u8,
27923}
27924impl STATUSTEXT_DATA {
27925    pub const ENCODED_LEN: usize = 54usize;
27926    pub const DEFAULT: Self = Self {
27927        severity: MavSeverity::DEFAULT,
27928        text: [0_u8; 50usize],
27929        id: 0_u16,
27930        chunk_seq: 0_u8,
27931    };
27932    #[cfg(feature = "arbitrary")]
27933    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27934        use arbitrary::{Arbitrary, Unstructured};
27935        let mut buf = [0u8; 1024];
27936        rng.fill_bytes(&mut buf);
27937        let mut unstructured = Unstructured::new(&buf);
27938        Self::arbitrary(&mut unstructured).unwrap_or_default()
27939    }
27940}
27941impl Default for STATUSTEXT_DATA {
27942    fn default() -> Self {
27943        Self::DEFAULT.clone()
27944    }
27945}
27946impl MessageData for STATUSTEXT_DATA {
27947    type Message = MavMessage;
27948    const ID: u32 = 253u32;
27949    const NAME: &'static str = "STATUSTEXT";
27950    const EXTRA_CRC: u8 = 83u8;
27951    const ENCODED_LEN: usize = 54usize;
27952    fn deser(
27953        _version: MavlinkVersion,
27954        __input: &[u8],
27955    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27956        let avail_len = __input.len();
27957        let mut payload_buf = [0; Self::ENCODED_LEN];
27958        let mut buf = if avail_len < Self::ENCODED_LEN {
27959            payload_buf[0..avail_len].copy_from_slice(__input);
27960            Bytes::new(&payload_buf)
27961        } else {
27962            Bytes::new(__input)
27963        };
27964        let mut __struct = Self::default();
27965        let tmp = buf.get_u8();
27966        __struct.severity =
27967            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27968                enum_type: "MavSeverity",
27969                value: tmp as u32,
27970            })?;
27971        for v in &mut __struct.text {
27972            let val = buf.get_u8();
27973            *v = val;
27974        }
27975        __struct.id = buf.get_u16_le();
27976        __struct.chunk_seq = buf.get_u8();
27977        Ok(__struct)
27978    }
27979    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27980        let mut __tmp = BytesMut::new(bytes);
27981        #[allow(clippy::absurd_extreme_comparisons)]
27982        #[allow(unused_comparisons)]
27983        if __tmp.remaining() < Self::ENCODED_LEN {
27984            panic!(
27985                "buffer is too small (need {} bytes, but got {})",
27986                Self::ENCODED_LEN,
27987                __tmp.remaining(),
27988            )
27989        }
27990        __tmp.put_u8(self.severity as u8);
27991        for val in &self.text {
27992            __tmp.put_u8(*val);
27993        }
27994        __tmp.put_u16_le(self.id);
27995        __tmp.put_u8(self.chunk_seq);
27996        if matches!(version, MavlinkVersion::V2) {
27997            let len = __tmp.len();
27998            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27999        } else {
28000            __tmp.len()
28001        }
28002    }
28003}
28004#[doc = "id: 261"]
28005#[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
28006#[derive(Debug, Clone, PartialEq)]
28007#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28008#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28009pub struct STORAGE_INFORMATION_DATA {
28010    #[doc = "Timestamp (time since system boot)."]
28011    pub time_boot_ms: u32,
28012    #[doc = "Total capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
28013    pub total_capacity: f32,
28014    #[doc = "Used capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
28015    pub used_capacity: f32,
28016    #[doc = "Available storage capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
28017    pub available_capacity: f32,
28018    #[doc = "Read speed."]
28019    pub read_speed: f32,
28020    #[doc = "Write speed."]
28021    pub write_speed: f32,
28022    #[doc = "Storage ID (1 for first, 2 for second, etc.)"]
28023    pub storage_id: u8,
28024    #[doc = "Number of storage devices"]
28025    pub storage_count: u8,
28026    #[doc = "Status of storage"]
28027    pub status: StorageStatus,
28028    #[doc = "Type of storage"]
28029    #[cfg_attr(feature = "serde", serde(default))]
28030    pub mavtype: StorageType,
28031    #[doc = "Textual storage name to be used in UI (microSD 1, Internal Memory, etc.) This is a NULL terminated string. If it is exactly 32 characters long, add a terminating NULL. If this string is empty, the generic type is shown to the user."]
28032    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28033    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28034    pub name: [u8; 32],
28035    #[doc = "Flags indicating whether this instance is preferred storage for photos, videos, etc.         Note: Implementations should initially set the flags on the system-default storage id used for saving media (if possible/supported).         This setting can then be overridden using MAV_CMD_SET_STORAGE_USAGE.         If the media usage flags are not set, a GCS may assume storage ID 1 is the default storage for all media types."]
28036    #[cfg_attr(feature = "serde", serde(default))]
28037    pub storage_usage: StorageUsageFlag,
28038}
28039impl STORAGE_INFORMATION_DATA {
28040    pub const ENCODED_LEN: usize = 61usize;
28041    pub const DEFAULT: Self = Self {
28042        time_boot_ms: 0_u32,
28043        total_capacity: 0.0_f32,
28044        used_capacity: 0.0_f32,
28045        available_capacity: 0.0_f32,
28046        read_speed: 0.0_f32,
28047        write_speed: 0.0_f32,
28048        storage_id: 0_u8,
28049        storage_count: 0_u8,
28050        status: StorageStatus::DEFAULT,
28051        mavtype: StorageType::DEFAULT,
28052        name: [0_u8; 32usize],
28053        storage_usage: StorageUsageFlag::DEFAULT,
28054    };
28055    #[cfg(feature = "arbitrary")]
28056    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28057        use arbitrary::{Arbitrary, Unstructured};
28058        let mut buf = [0u8; 1024];
28059        rng.fill_bytes(&mut buf);
28060        let mut unstructured = Unstructured::new(&buf);
28061        Self::arbitrary(&mut unstructured).unwrap_or_default()
28062    }
28063}
28064impl Default for STORAGE_INFORMATION_DATA {
28065    fn default() -> Self {
28066        Self::DEFAULT.clone()
28067    }
28068}
28069impl MessageData for STORAGE_INFORMATION_DATA {
28070    type Message = MavMessage;
28071    const ID: u32 = 261u32;
28072    const NAME: &'static str = "STORAGE_INFORMATION";
28073    const EXTRA_CRC: u8 = 179u8;
28074    const ENCODED_LEN: usize = 61usize;
28075    fn deser(
28076        _version: MavlinkVersion,
28077        __input: &[u8],
28078    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28079        let avail_len = __input.len();
28080        let mut payload_buf = [0; Self::ENCODED_LEN];
28081        let mut buf = if avail_len < Self::ENCODED_LEN {
28082            payload_buf[0..avail_len].copy_from_slice(__input);
28083            Bytes::new(&payload_buf)
28084        } else {
28085            Bytes::new(__input)
28086        };
28087        let mut __struct = Self::default();
28088        __struct.time_boot_ms = buf.get_u32_le();
28089        __struct.total_capacity = buf.get_f32_le();
28090        __struct.used_capacity = buf.get_f32_le();
28091        __struct.available_capacity = buf.get_f32_le();
28092        __struct.read_speed = buf.get_f32_le();
28093        __struct.write_speed = buf.get_f32_le();
28094        __struct.storage_id = buf.get_u8();
28095        __struct.storage_count = buf.get_u8();
28096        let tmp = buf.get_u8();
28097        __struct.status =
28098            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28099                enum_type: "StorageStatus",
28100                value: tmp as u32,
28101            })?;
28102        let tmp = buf.get_u8();
28103        __struct.mavtype =
28104            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28105                enum_type: "StorageType",
28106                value: tmp as u32,
28107            })?;
28108        for v in &mut __struct.name {
28109            let val = buf.get_u8();
28110            *v = val;
28111        }
28112        let tmp = buf.get_u8();
28113        __struct.storage_usage = StorageUsageFlag::from_bits(tmp & StorageUsageFlag::all().bits())
28114            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28115                flag_type: "StorageUsageFlag",
28116                value: tmp as u32,
28117            })?;
28118        Ok(__struct)
28119    }
28120    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28121        let mut __tmp = BytesMut::new(bytes);
28122        #[allow(clippy::absurd_extreme_comparisons)]
28123        #[allow(unused_comparisons)]
28124        if __tmp.remaining() < Self::ENCODED_LEN {
28125            panic!(
28126                "buffer is too small (need {} bytes, but got {})",
28127                Self::ENCODED_LEN,
28128                __tmp.remaining(),
28129            )
28130        }
28131        __tmp.put_u32_le(self.time_boot_ms);
28132        __tmp.put_f32_le(self.total_capacity);
28133        __tmp.put_f32_le(self.used_capacity);
28134        __tmp.put_f32_le(self.available_capacity);
28135        __tmp.put_f32_le(self.read_speed);
28136        __tmp.put_f32_le(self.write_speed);
28137        __tmp.put_u8(self.storage_id);
28138        __tmp.put_u8(self.storage_count);
28139        __tmp.put_u8(self.status as u8);
28140        __tmp.put_u8(self.mavtype as u8);
28141        for val in &self.name {
28142            __tmp.put_u8(*val);
28143        }
28144        __tmp.put_u8(self.storage_usage.bits());
28145        if matches!(version, MavlinkVersion::V2) {
28146            let len = __tmp.len();
28147            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28148        } else {
28149            __tmp.len()
28150        }
28151    }
28152}
28153#[doc = "id: 401"]
28154#[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
28155#[derive(Debug, Clone, PartialEq)]
28156#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28157#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28158pub struct SUPPORTED_TUNES_DATA {
28159    #[doc = "Bitfield of supported tune formats."]
28160    pub format: TuneFormat,
28161    #[doc = "System ID"]
28162    pub target_system: u8,
28163    #[doc = "Component ID"]
28164    pub target_component: u8,
28165}
28166impl SUPPORTED_TUNES_DATA {
28167    pub const ENCODED_LEN: usize = 6usize;
28168    pub const DEFAULT: Self = Self {
28169        format: TuneFormat::DEFAULT,
28170        target_system: 0_u8,
28171        target_component: 0_u8,
28172    };
28173    #[cfg(feature = "arbitrary")]
28174    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28175        use arbitrary::{Arbitrary, Unstructured};
28176        let mut buf = [0u8; 1024];
28177        rng.fill_bytes(&mut buf);
28178        let mut unstructured = Unstructured::new(&buf);
28179        Self::arbitrary(&mut unstructured).unwrap_or_default()
28180    }
28181}
28182impl Default for SUPPORTED_TUNES_DATA {
28183    fn default() -> Self {
28184        Self::DEFAULT.clone()
28185    }
28186}
28187impl MessageData for SUPPORTED_TUNES_DATA {
28188    type Message = MavMessage;
28189    const ID: u32 = 401u32;
28190    const NAME: &'static str = "SUPPORTED_TUNES";
28191    const EXTRA_CRC: u8 = 183u8;
28192    const ENCODED_LEN: usize = 6usize;
28193    fn deser(
28194        _version: MavlinkVersion,
28195        __input: &[u8],
28196    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28197        let avail_len = __input.len();
28198        let mut payload_buf = [0; Self::ENCODED_LEN];
28199        let mut buf = if avail_len < Self::ENCODED_LEN {
28200            payload_buf[0..avail_len].copy_from_slice(__input);
28201            Bytes::new(&payload_buf)
28202        } else {
28203            Bytes::new(__input)
28204        };
28205        let mut __struct = Self::default();
28206        let tmp = buf.get_u32_le();
28207        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
28208            ::mavlink_core::error::ParserError::InvalidEnum {
28209                enum_type: "TuneFormat",
28210                value: tmp as u32,
28211            },
28212        )?;
28213        __struct.target_system = buf.get_u8();
28214        __struct.target_component = buf.get_u8();
28215        Ok(__struct)
28216    }
28217    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28218        let mut __tmp = BytesMut::new(bytes);
28219        #[allow(clippy::absurd_extreme_comparisons)]
28220        #[allow(unused_comparisons)]
28221        if __tmp.remaining() < Self::ENCODED_LEN {
28222            panic!(
28223                "buffer is too small (need {} bytes, but got {})",
28224                Self::ENCODED_LEN,
28225                __tmp.remaining(),
28226            )
28227        }
28228        __tmp.put_u32_le(self.format as u32);
28229        __tmp.put_u8(self.target_system);
28230        __tmp.put_u8(self.target_component);
28231        if matches!(version, MavlinkVersion::V2) {
28232            let len = __tmp.len();
28233            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28234        } else {
28235            __tmp.len()
28236        }
28237    }
28238}
28239#[doc = "id: 2"]
28240#[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
28241#[derive(Debug, Clone, PartialEq)]
28242#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28243#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28244pub struct SYSTEM_TIME_DATA {
28245    #[doc = "Timestamp (UNIX epoch time)."]
28246    pub time_unix_usec: u64,
28247    #[doc = "Timestamp (time since system boot)."]
28248    pub time_boot_ms: u32,
28249}
28250impl SYSTEM_TIME_DATA {
28251    pub const ENCODED_LEN: usize = 12usize;
28252    pub const DEFAULT: Self = Self {
28253        time_unix_usec: 0_u64,
28254        time_boot_ms: 0_u32,
28255    };
28256    #[cfg(feature = "arbitrary")]
28257    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28258        use arbitrary::{Arbitrary, Unstructured};
28259        let mut buf = [0u8; 1024];
28260        rng.fill_bytes(&mut buf);
28261        let mut unstructured = Unstructured::new(&buf);
28262        Self::arbitrary(&mut unstructured).unwrap_or_default()
28263    }
28264}
28265impl Default for SYSTEM_TIME_DATA {
28266    fn default() -> Self {
28267        Self::DEFAULT.clone()
28268    }
28269}
28270impl MessageData for SYSTEM_TIME_DATA {
28271    type Message = MavMessage;
28272    const ID: u32 = 2u32;
28273    const NAME: &'static str = "SYSTEM_TIME";
28274    const EXTRA_CRC: u8 = 137u8;
28275    const ENCODED_LEN: usize = 12usize;
28276    fn deser(
28277        _version: MavlinkVersion,
28278        __input: &[u8],
28279    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28280        let avail_len = __input.len();
28281        let mut payload_buf = [0; Self::ENCODED_LEN];
28282        let mut buf = if avail_len < Self::ENCODED_LEN {
28283            payload_buf[0..avail_len].copy_from_slice(__input);
28284            Bytes::new(&payload_buf)
28285        } else {
28286            Bytes::new(__input)
28287        };
28288        let mut __struct = Self::default();
28289        __struct.time_unix_usec = buf.get_u64_le();
28290        __struct.time_boot_ms = buf.get_u32_le();
28291        Ok(__struct)
28292    }
28293    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28294        let mut __tmp = BytesMut::new(bytes);
28295        #[allow(clippy::absurd_extreme_comparisons)]
28296        #[allow(unused_comparisons)]
28297        if __tmp.remaining() < Self::ENCODED_LEN {
28298            panic!(
28299                "buffer is too small (need {} bytes, but got {})",
28300                Self::ENCODED_LEN,
28301                __tmp.remaining(),
28302            )
28303        }
28304        __tmp.put_u64_le(self.time_unix_usec);
28305        __tmp.put_u32_le(self.time_boot_ms);
28306        if matches!(version, MavlinkVersion::V2) {
28307            let len = __tmp.len();
28308            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28309        } else {
28310            __tmp.len()
28311        }
28312    }
28313}
28314#[doc = "id: 1"]
28315#[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
28316#[derive(Debug, Clone, PartialEq)]
28317#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28318#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28319pub struct SYS_STATUS_DATA {
28320    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
28321    pub onboard_control_sensors_present: MavSysStatusSensor,
28322    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
28323    pub onboard_control_sensors_enabled: MavSysStatusSensor,
28324    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
28325    pub onboard_control_sensors_health: MavSysStatusSensor,
28326    #[doc = "Maximum usage in percent of the mainloop time. Values: [0-1000] - should always be below 1000"]
28327    pub load: u16,
28328    #[doc = "Battery voltage, UINT16_MAX: Voltage not sent by autopilot"]
28329    pub voltage_battery: u16,
28330    #[doc = "Battery current, -1: Current not sent by autopilot"]
28331    pub current_battery: i16,
28332    #[doc = "Communication drop rate, (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
28333    pub drop_rate_comm: u16,
28334    #[doc = "Communication errors (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
28335    pub errors_comm: u16,
28336    #[doc = "Autopilot-specific errors"]
28337    pub errors_count1: u16,
28338    #[doc = "Autopilot-specific errors"]
28339    pub errors_count2: u16,
28340    #[doc = "Autopilot-specific errors"]
28341    pub errors_count3: u16,
28342    #[doc = "Autopilot-specific errors"]
28343    pub errors_count4: u16,
28344    #[doc = "Battery energy remaining, -1: Battery remaining energy not sent by autopilot"]
28345    pub battery_remaining: i8,
28346    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
28347    #[cfg_attr(feature = "serde", serde(default))]
28348    pub onboard_control_sensors_present_extended: MavSysStatusSensorExtended,
28349    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
28350    #[cfg_attr(feature = "serde", serde(default))]
28351    pub onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended,
28352    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
28353    #[cfg_attr(feature = "serde", serde(default))]
28354    pub onboard_control_sensors_health_extended: MavSysStatusSensorExtended,
28355}
28356impl SYS_STATUS_DATA {
28357    pub const ENCODED_LEN: usize = 43usize;
28358    pub const DEFAULT: Self = Self {
28359        onboard_control_sensors_present: MavSysStatusSensor::DEFAULT,
28360        onboard_control_sensors_enabled: MavSysStatusSensor::DEFAULT,
28361        onboard_control_sensors_health: MavSysStatusSensor::DEFAULT,
28362        load: 0_u16,
28363        voltage_battery: 0_u16,
28364        current_battery: 0_i16,
28365        drop_rate_comm: 0_u16,
28366        errors_comm: 0_u16,
28367        errors_count1: 0_u16,
28368        errors_count2: 0_u16,
28369        errors_count3: 0_u16,
28370        errors_count4: 0_u16,
28371        battery_remaining: 0_i8,
28372        onboard_control_sensors_present_extended: MavSysStatusSensorExtended::DEFAULT,
28373        onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended::DEFAULT,
28374        onboard_control_sensors_health_extended: MavSysStatusSensorExtended::DEFAULT,
28375    };
28376    #[cfg(feature = "arbitrary")]
28377    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28378        use arbitrary::{Arbitrary, Unstructured};
28379        let mut buf = [0u8; 1024];
28380        rng.fill_bytes(&mut buf);
28381        let mut unstructured = Unstructured::new(&buf);
28382        Self::arbitrary(&mut unstructured).unwrap_or_default()
28383    }
28384}
28385impl Default for SYS_STATUS_DATA {
28386    fn default() -> Self {
28387        Self::DEFAULT.clone()
28388    }
28389}
28390impl MessageData for SYS_STATUS_DATA {
28391    type Message = MavMessage;
28392    const ID: u32 = 1u32;
28393    const NAME: &'static str = "SYS_STATUS";
28394    const EXTRA_CRC: u8 = 124u8;
28395    const ENCODED_LEN: usize = 43usize;
28396    fn deser(
28397        _version: MavlinkVersion,
28398        __input: &[u8],
28399    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28400        let avail_len = __input.len();
28401        let mut payload_buf = [0; Self::ENCODED_LEN];
28402        let mut buf = if avail_len < Self::ENCODED_LEN {
28403            payload_buf[0..avail_len].copy_from_slice(__input);
28404            Bytes::new(&payload_buf)
28405        } else {
28406            Bytes::new(__input)
28407        };
28408        let mut __struct = Self::default();
28409        let tmp = buf.get_u32_le();
28410        __struct.onboard_control_sensors_present = MavSysStatusSensor::from_bits(
28411            tmp & MavSysStatusSensor::all().bits(),
28412        )
28413        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28414            flag_type: "MavSysStatusSensor",
28415            value: tmp as u32,
28416        })?;
28417        let tmp = buf.get_u32_le();
28418        __struct.onboard_control_sensors_enabled = MavSysStatusSensor::from_bits(
28419            tmp & MavSysStatusSensor::all().bits(),
28420        )
28421        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28422            flag_type: "MavSysStatusSensor",
28423            value: tmp as u32,
28424        })?;
28425        let tmp = buf.get_u32_le();
28426        __struct.onboard_control_sensors_health = MavSysStatusSensor::from_bits(
28427            tmp & MavSysStatusSensor::all().bits(),
28428        )
28429        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28430            flag_type: "MavSysStatusSensor",
28431            value: tmp as u32,
28432        })?;
28433        __struct.load = buf.get_u16_le();
28434        __struct.voltage_battery = buf.get_u16_le();
28435        __struct.current_battery = buf.get_i16_le();
28436        __struct.drop_rate_comm = buf.get_u16_le();
28437        __struct.errors_comm = buf.get_u16_le();
28438        __struct.errors_count1 = buf.get_u16_le();
28439        __struct.errors_count2 = buf.get_u16_le();
28440        __struct.errors_count3 = buf.get_u16_le();
28441        __struct.errors_count4 = buf.get_u16_le();
28442        __struct.battery_remaining = buf.get_i8();
28443        let tmp = buf.get_u32_le();
28444        __struct.onboard_control_sensors_present_extended =
28445            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
28446                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28447                flag_type: "MavSysStatusSensorExtended",
28448                value: tmp as u32,
28449            })?;
28450        let tmp = buf.get_u32_le();
28451        __struct.onboard_control_sensors_enabled_extended =
28452            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
28453                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28454                flag_type: "MavSysStatusSensorExtended",
28455                value: tmp as u32,
28456            })?;
28457        let tmp = buf.get_u32_le();
28458        __struct.onboard_control_sensors_health_extended =
28459            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
28460                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28461                flag_type: "MavSysStatusSensorExtended",
28462                value: tmp as u32,
28463            })?;
28464        Ok(__struct)
28465    }
28466    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28467        let mut __tmp = BytesMut::new(bytes);
28468        #[allow(clippy::absurd_extreme_comparisons)]
28469        #[allow(unused_comparisons)]
28470        if __tmp.remaining() < Self::ENCODED_LEN {
28471            panic!(
28472                "buffer is too small (need {} bytes, but got {})",
28473                Self::ENCODED_LEN,
28474                __tmp.remaining(),
28475            )
28476        }
28477        __tmp.put_u32_le(self.onboard_control_sensors_present.bits());
28478        __tmp.put_u32_le(self.onboard_control_sensors_enabled.bits());
28479        __tmp.put_u32_le(self.onboard_control_sensors_health.bits());
28480        __tmp.put_u16_le(self.load);
28481        __tmp.put_u16_le(self.voltage_battery);
28482        __tmp.put_i16_le(self.current_battery);
28483        __tmp.put_u16_le(self.drop_rate_comm);
28484        __tmp.put_u16_le(self.errors_comm);
28485        __tmp.put_u16_le(self.errors_count1);
28486        __tmp.put_u16_le(self.errors_count2);
28487        __tmp.put_u16_le(self.errors_count3);
28488        __tmp.put_u16_le(self.errors_count4);
28489        __tmp.put_i8(self.battery_remaining);
28490        __tmp.put_u32_le(self.onboard_control_sensors_present_extended.bits());
28491        __tmp.put_u32_le(self.onboard_control_sensors_enabled_extended.bits());
28492        __tmp.put_u32_le(self.onboard_control_sensors_health_extended.bits());
28493        if matches!(version, MavlinkVersion::V2) {
28494            let len = __tmp.len();
28495            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28496        } else {
28497            __tmp.len()
28498        }
28499    }
28500}
28501#[doc = "id: 135"]
28502#[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
28503#[derive(Debug, Clone, PartialEq)]
28504#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28505#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28506pub struct TERRAIN_CHECK_DATA {
28507    #[doc = "Latitude"]
28508    pub lat: i32,
28509    #[doc = "Longitude"]
28510    pub lon: i32,
28511}
28512impl TERRAIN_CHECK_DATA {
28513    pub const ENCODED_LEN: usize = 8usize;
28514    pub const DEFAULT: Self = Self {
28515        lat: 0_i32,
28516        lon: 0_i32,
28517    };
28518    #[cfg(feature = "arbitrary")]
28519    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28520        use arbitrary::{Arbitrary, Unstructured};
28521        let mut buf = [0u8; 1024];
28522        rng.fill_bytes(&mut buf);
28523        let mut unstructured = Unstructured::new(&buf);
28524        Self::arbitrary(&mut unstructured).unwrap_or_default()
28525    }
28526}
28527impl Default for TERRAIN_CHECK_DATA {
28528    fn default() -> Self {
28529        Self::DEFAULT.clone()
28530    }
28531}
28532impl MessageData for TERRAIN_CHECK_DATA {
28533    type Message = MavMessage;
28534    const ID: u32 = 135u32;
28535    const NAME: &'static str = "TERRAIN_CHECK";
28536    const EXTRA_CRC: u8 = 203u8;
28537    const ENCODED_LEN: usize = 8usize;
28538    fn deser(
28539        _version: MavlinkVersion,
28540        __input: &[u8],
28541    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28542        let avail_len = __input.len();
28543        let mut payload_buf = [0; Self::ENCODED_LEN];
28544        let mut buf = if avail_len < Self::ENCODED_LEN {
28545            payload_buf[0..avail_len].copy_from_slice(__input);
28546            Bytes::new(&payload_buf)
28547        } else {
28548            Bytes::new(__input)
28549        };
28550        let mut __struct = Self::default();
28551        __struct.lat = buf.get_i32_le();
28552        __struct.lon = buf.get_i32_le();
28553        Ok(__struct)
28554    }
28555    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28556        let mut __tmp = BytesMut::new(bytes);
28557        #[allow(clippy::absurd_extreme_comparisons)]
28558        #[allow(unused_comparisons)]
28559        if __tmp.remaining() < Self::ENCODED_LEN {
28560            panic!(
28561                "buffer is too small (need {} bytes, but got {})",
28562                Self::ENCODED_LEN,
28563                __tmp.remaining(),
28564            )
28565        }
28566        __tmp.put_i32_le(self.lat);
28567        __tmp.put_i32_le(self.lon);
28568        if matches!(version, MavlinkVersion::V2) {
28569            let len = __tmp.len();
28570            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28571        } else {
28572            __tmp.len()
28573        }
28574    }
28575}
28576#[doc = "id: 134"]
28577#[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
28578#[derive(Debug, Clone, PartialEq)]
28579#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28580#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28581pub struct TERRAIN_DATA_DATA {
28582    #[doc = "Latitude of SW corner of first grid"]
28583    pub lat: i32,
28584    #[doc = "Longitude of SW corner of first grid"]
28585    pub lon: i32,
28586    #[doc = "Grid spacing"]
28587    pub grid_spacing: u16,
28588    #[doc = "Terrain data MSL"]
28589    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28590    pub data: [i16; 16],
28591    #[doc = "bit within the terrain request mask"]
28592    pub gridbit: u8,
28593}
28594impl TERRAIN_DATA_DATA {
28595    pub const ENCODED_LEN: usize = 43usize;
28596    pub const DEFAULT: Self = Self {
28597        lat: 0_i32,
28598        lon: 0_i32,
28599        grid_spacing: 0_u16,
28600        data: [0_i16; 16usize],
28601        gridbit: 0_u8,
28602    };
28603    #[cfg(feature = "arbitrary")]
28604    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28605        use arbitrary::{Arbitrary, Unstructured};
28606        let mut buf = [0u8; 1024];
28607        rng.fill_bytes(&mut buf);
28608        let mut unstructured = Unstructured::new(&buf);
28609        Self::arbitrary(&mut unstructured).unwrap_or_default()
28610    }
28611}
28612impl Default for TERRAIN_DATA_DATA {
28613    fn default() -> Self {
28614        Self::DEFAULT.clone()
28615    }
28616}
28617impl MessageData for TERRAIN_DATA_DATA {
28618    type Message = MavMessage;
28619    const ID: u32 = 134u32;
28620    const NAME: &'static str = "TERRAIN_DATA";
28621    const EXTRA_CRC: u8 = 229u8;
28622    const ENCODED_LEN: usize = 43usize;
28623    fn deser(
28624        _version: MavlinkVersion,
28625        __input: &[u8],
28626    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28627        let avail_len = __input.len();
28628        let mut payload_buf = [0; Self::ENCODED_LEN];
28629        let mut buf = if avail_len < Self::ENCODED_LEN {
28630            payload_buf[0..avail_len].copy_from_slice(__input);
28631            Bytes::new(&payload_buf)
28632        } else {
28633            Bytes::new(__input)
28634        };
28635        let mut __struct = Self::default();
28636        __struct.lat = buf.get_i32_le();
28637        __struct.lon = buf.get_i32_le();
28638        __struct.grid_spacing = buf.get_u16_le();
28639        for v in &mut __struct.data {
28640            let val = buf.get_i16_le();
28641            *v = val;
28642        }
28643        __struct.gridbit = buf.get_u8();
28644        Ok(__struct)
28645    }
28646    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28647        let mut __tmp = BytesMut::new(bytes);
28648        #[allow(clippy::absurd_extreme_comparisons)]
28649        #[allow(unused_comparisons)]
28650        if __tmp.remaining() < Self::ENCODED_LEN {
28651            panic!(
28652                "buffer is too small (need {} bytes, but got {})",
28653                Self::ENCODED_LEN,
28654                __tmp.remaining(),
28655            )
28656        }
28657        __tmp.put_i32_le(self.lat);
28658        __tmp.put_i32_le(self.lon);
28659        __tmp.put_u16_le(self.grid_spacing);
28660        for val in &self.data {
28661            __tmp.put_i16_le(*val);
28662        }
28663        __tmp.put_u8(self.gridbit);
28664        if matches!(version, MavlinkVersion::V2) {
28665            let len = __tmp.len();
28666            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28667        } else {
28668            __tmp.len()
28669        }
28670    }
28671}
28672#[doc = "id: 136"]
28673#[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
28674#[derive(Debug, Clone, PartialEq)]
28675#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28676#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28677pub struct TERRAIN_REPORT_DATA {
28678    #[doc = "Latitude"]
28679    pub lat: i32,
28680    #[doc = "Longitude"]
28681    pub lon: i32,
28682    #[doc = "Terrain height MSL"]
28683    pub terrain_height: f32,
28684    #[doc = "Current vehicle height above lat/lon terrain height"]
28685    pub current_height: f32,
28686    #[doc = "grid spacing (zero if terrain at this location unavailable)"]
28687    pub spacing: u16,
28688    #[doc = "Number of 4x4 terrain blocks waiting to be received or read from disk"]
28689    pub pending: u16,
28690    #[doc = "Number of 4x4 terrain blocks in memory"]
28691    pub loaded: u16,
28692}
28693impl TERRAIN_REPORT_DATA {
28694    pub const ENCODED_LEN: usize = 22usize;
28695    pub const DEFAULT: Self = Self {
28696        lat: 0_i32,
28697        lon: 0_i32,
28698        terrain_height: 0.0_f32,
28699        current_height: 0.0_f32,
28700        spacing: 0_u16,
28701        pending: 0_u16,
28702        loaded: 0_u16,
28703    };
28704    #[cfg(feature = "arbitrary")]
28705    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28706        use arbitrary::{Arbitrary, Unstructured};
28707        let mut buf = [0u8; 1024];
28708        rng.fill_bytes(&mut buf);
28709        let mut unstructured = Unstructured::new(&buf);
28710        Self::arbitrary(&mut unstructured).unwrap_or_default()
28711    }
28712}
28713impl Default for TERRAIN_REPORT_DATA {
28714    fn default() -> Self {
28715        Self::DEFAULT.clone()
28716    }
28717}
28718impl MessageData for TERRAIN_REPORT_DATA {
28719    type Message = MavMessage;
28720    const ID: u32 = 136u32;
28721    const NAME: &'static str = "TERRAIN_REPORT";
28722    const EXTRA_CRC: u8 = 1u8;
28723    const ENCODED_LEN: usize = 22usize;
28724    fn deser(
28725        _version: MavlinkVersion,
28726        __input: &[u8],
28727    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28728        let avail_len = __input.len();
28729        let mut payload_buf = [0; Self::ENCODED_LEN];
28730        let mut buf = if avail_len < Self::ENCODED_LEN {
28731            payload_buf[0..avail_len].copy_from_slice(__input);
28732            Bytes::new(&payload_buf)
28733        } else {
28734            Bytes::new(__input)
28735        };
28736        let mut __struct = Self::default();
28737        __struct.lat = buf.get_i32_le();
28738        __struct.lon = buf.get_i32_le();
28739        __struct.terrain_height = buf.get_f32_le();
28740        __struct.current_height = buf.get_f32_le();
28741        __struct.spacing = buf.get_u16_le();
28742        __struct.pending = buf.get_u16_le();
28743        __struct.loaded = buf.get_u16_le();
28744        Ok(__struct)
28745    }
28746    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28747        let mut __tmp = BytesMut::new(bytes);
28748        #[allow(clippy::absurd_extreme_comparisons)]
28749        #[allow(unused_comparisons)]
28750        if __tmp.remaining() < Self::ENCODED_LEN {
28751            panic!(
28752                "buffer is too small (need {} bytes, but got {})",
28753                Self::ENCODED_LEN,
28754                __tmp.remaining(),
28755            )
28756        }
28757        __tmp.put_i32_le(self.lat);
28758        __tmp.put_i32_le(self.lon);
28759        __tmp.put_f32_le(self.terrain_height);
28760        __tmp.put_f32_le(self.current_height);
28761        __tmp.put_u16_le(self.spacing);
28762        __tmp.put_u16_le(self.pending);
28763        __tmp.put_u16_le(self.loaded);
28764        if matches!(version, MavlinkVersion::V2) {
28765            let len = __tmp.len();
28766            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28767        } else {
28768            __tmp.len()
28769        }
28770    }
28771}
28772#[doc = "id: 133"]
28773#[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
28774#[derive(Debug, Clone, PartialEq)]
28775#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28776#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28777pub struct TERRAIN_REQUEST_DATA {
28778    #[doc = "Bitmask of requested 4x4 grids (row major 8x7 array of grids, 56 bits)"]
28779    pub mask: u64,
28780    #[doc = "Latitude of SW corner of first grid"]
28781    pub lat: i32,
28782    #[doc = "Longitude of SW corner of first grid"]
28783    pub lon: i32,
28784    #[doc = "Grid spacing"]
28785    pub grid_spacing: u16,
28786}
28787impl TERRAIN_REQUEST_DATA {
28788    pub const ENCODED_LEN: usize = 18usize;
28789    pub const DEFAULT: Self = Self {
28790        mask: 0_u64,
28791        lat: 0_i32,
28792        lon: 0_i32,
28793        grid_spacing: 0_u16,
28794    };
28795    #[cfg(feature = "arbitrary")]
28796    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28797        use arbitrary::{Arbitrary, Unstructured};
28798        let mut buf = [0u8; 1024];
28799        rng.fill_bytes(&mut buf);
28800        let mut unstructured = Unstructured::new(&buf);
28801        Self::arbitrary(&mut unstructured).unwrap_or_default()
28802    }
28803}
28804impl Default for TERRAIN_REQUEST_DATA {
28805    fn default() -> Self {
28806        Self::DEFAULT.clone()
28807    }
28808}
28809impl MessageData for TERRAIN_REQUEST_DATA {
28810    type Message = MavMessage;
28811    const ID: u32 = 133u32;
28812    const NAME: &'static str = "TERRAIN_REQUEST";
28813    const EXTRA_CRC: u8 = 6u8;
28814    const ENCODED_LEN: usize = 18usize;
28815    fn deser(
28816        _version: MavlinkVersion,
28817        __input: &[u8],
28818    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28819        let avail_len = __input.len();
28820        let mut payload_buf = [0; Self::ENCODED_LEN];
28821        let mut buf = if avail_len < Self::ENCODED_LEN {
28822            payload_buf[0..avail_len].copy_from_slice(__input);
28823            Bytes::new(&payload_buf)
28824        } else {
28825            Bytes::new(__input)
28826        };
28827        let mut __struct = Self::default();
28828        __struct.mask = buf.get_u64_le();
28829        __struct.lat = buf.get_i32_le();
28830        __struct.lon = buf.get_i32_le();
28831        __struct.grid_spacing = buf.get_u16_le();
28832        Ok(__struct)
28833    }
28834    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28835        let mut __tmp = BytesMut::new(bytes);
28836        #[allow(clippy::absurd_extreme_comparisons)]
28837        #[allow(unused_comparisons)]
28838        if __tmp.remaining() < Self::ENCODED_LEN {
28839            panic!(
28840                "buffer is too small (need {} bytes, but got {})",
28841                Self::ENCODED_LEN,
28842                __tmp.remaining(),
28843            )
28844        }
28845        __tmp.put_u64_le(self.mask);
28846        __tmp.put_i32_le(self.lat);
28847        __tmp.put_i32_le(self.lon);
28848        __tmp.put_u16_le(self.grid_spacing);
28849        if matches!(version, MavlinkVersion::V2) {
28850            let len = __tmp.len();
28851            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28852        } else {
28853            __tmp.len()
28854        }
28855    }
28856}
28857#[doc = "id: 111"]
28858#[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
28859#[derive(Debug, Clone, PartialEq)]
28860#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28861#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28862pub struct TIMESYNC_DATA {
28863    #[doc = "Time sync timestamp 1. Syncing: 0. Responding: Timestamp of responding component."]
28864    pub tc1: i64,
28865    #[doc = "Time sync timestamp 2. Timestamp of syncing component (mirrored in response)."]
28866    pub ts1: i64,
28867    #[doc = "Target system id. Request: 0 (broadcast) or id of specific system. Response must contain system id of the requesting component."]
28868    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28869    pub target_system: u8,
28870    #[doc = "Target component id. Request: 0 (broadcast) or id of specific component. Response must contain component id of the requesting component."]
28871    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28872    pub target_component: u8,
28873}
28874impl TIMESYNC_DATA {
28875    pub const ENCODED_LEN: usize = 18usize;
28876    pub const DEFAULT: Self = Self {
28877        tc1: 0_i64,
28878        ts1: 0_i64,
28879        target_system: 0_u8,
28880        target_component: 0_u8,
28881    };
28882    #[cfg(feature = "arbitrary")]
28883    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28884        use arbitrary::{Arbitrary, Unstructured};
28885        let mut buf = [0u8; 1024];
28886        rng.fill_bytes(&mut buf);
28887        let mut unstructured = Unstructured::new(&buf);
28888        Self::arbitrary(&mut unstructured).unwrap_or_default()
28889    }
28890}
28891impl Default for TIMESYNC_DATA {
28892    fn default() -> Self {
28893        Self::DEFAULT.clone()
28894    }
28895}
28896impl MessageData for TIMESYNC_DATA {
28897    type Message = MavMessage;
28898    const ID: u32 = 111u32;
28899    const NAME: &'static str = "TIMESYNC";
28900    const EXTRA_CRC: u8 = 34u8;
28901    const ENCODED_LEN: usize = 18usize;
28902    fn deser(
28903        _version: MavlinkVersion,
28904        __input: &[u8],
28905    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28906        let avail_len = __input.len();
28907        let mut payload_buf = [0; Self::ENCODED_LEN];
28908        let mut buf = if avail_len < Self::ENCODED_LEN {
28909            payload_buf[0..avail_len].copy_from_slice(__input);
28910            Bytes::new(&payload_buf)
28911        } else {
28912            Bytes::new(__input)
28913        };
28914        let mut __struct = Self::default();
28915        __struct.tc1 = buf.get_i64_le();
28916        __struct.ts1 = buf.get_i64_le();
28917        __struct.target_system = buf.get_u8();
28918        __struct.target_component = buf.get_u8();
28919        Ok(__struct)
28920    }
28921    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28922        let mut __tmp = BytesMut::new(bytes);
28923        #[allow(clippy::absurd_extreme_comparisons)]
28924        #[allow(unused_comparisons)]
28925        if __tmp.remaining() < Self::ENCODED_LEN {
28926            panic!(
28927                "buffer is too small (need {} bytes, but got {})",
28928                Self::ENCODED_LEN,
28929                __tmp.remaining(),
28930            )
28931        }
28932        __tmp.put_i64_le(self.tc1);
28933        __tmp.put_i64_le(self.ts1);
28934        __tmp.put_u8(self.target_system);
28935        __tmp.put_u8(self.target_component);
28936        if matches!(version, MavlinkVersion::V2) {
28937            let len = __tmp.len();
28938            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28939        } else {
28940            __tmp.len()
28941        }
28942    }
28943}
28944#[doc = "id: 380"]
28945#[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
28946#[derive(Debug, Clone, PartialEq)]
28947#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28948#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28949pub struct TIME_ESTIMATE_TO_TARGET_DATA {
28950    #[doc = "Estimated time to complete the vehicle's configured \"safe return\" action from its current position (e.g. RTL, Smart RTL, etc.). -1 indicates that the vehicle is landed, or that no time estimate available."]
28951    pub safe_return: i32,
28952    #[doc = "Estimated time for vehicle to complete the LAND action from its current position. -1 indicates that the vehicle is landed, or that no time estimate available."]
28953    pub land: i32,
28954    #[doc = "Estimated time for reaching/completing the currently active mission item. -1 means no time estimate available."]
28955    pub mission_next_item: i32,
28956    #[doc = "Estimated time for completing the current mission. -1 means no mission active and/or no estimate available."]
28957    pub mission_end: i32,
28958    #[doc = "Estimated time for completing the current commanded action (i.e. Go To, Takeoff, Land, etc.). -1 means no action active and/or no estimate available."]
28959    pub commanded_action: i32,
28960}
28961impl TIME_ESTIMATE_TO_TARGET_DATA {
28962    pub const ENCODED_LEN: usize = 20usize;
28963    pub const DEFAULT: Self = Self {
28964        safe_return: 0_i32,
28965        land: 0_i32,
28966        mission_next_item: 0_i32,
28967        mission_end: 0_i32,
28968        commanded_action: 0_i32,
28969    };
28970    #[cfg(feature = "arbitrary")]
28971    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28972        use arbitrary::{Arbitrary, Unstructured};
28973        let mut buf = [0u8; 1024];
28974        rng.fill_bytes(&mut buf);
28975        let mut unstructured = Unstructured::new(&buf);
28976        Self::arbitrary(&mut unstructured).unwrap_or_default()
28977    }
28978}
28979impl Default for TIME_ESTIMATE_TO_TARGET_DATA {
28980    fn default() -> Self {
28981        Self::DEFAULT.clone()
28982    }
28983}
28984impl MessageData for TIME_ESTIMATE_TO_TARGET_DATA {
28985    type Message = MavMessage;
28986    const ID: u32 = 380u32;
28987    const NAME: &'static str = "TIME_ESTIMATE_TO_TARGET";
28988    const EXTRA_CRC: u8 = 232u8;
28989    const ENCODED_LEN: usize = 20usize;
28990    fn deser(
28991        _version: MavlinkVersion,
28992        __input: &[u8],
28993    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28994        let avail_len = __input.len();
28995        let mut payload_buf = [0; Self::ENCODED_LEN];
28996        let mut buf = if avail_len < Self::ENCODED_LEN {
28997            payload_buf[0..avail_len].copy_from_slice(__input);
28998            Bytes::new(&payload_buf)
28999        } else {
29000            Bytes::new(__input)
29001        };
29002        let mut __struct = Self::default();
29003        __struct.safe_return = buf.get_i32_le();
29004        __struct.land = buf.get_i32_le();
29005        __struct.mission_next_item = buf.get_i32_le();
29006        __struct.mission_end = buf.get_i32_le();
29007        __struct.commanded_action = buf.get_i32_le();
29008        Ok(__struct)
29009    }
29010    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29011        let mut __tmp = BytesMut::new(bytes);
29012        #[allow(clippy::absurd_extreme_comparisons)]
29013        #[allow(unused_comparisons)]
29014        if __tmp.remaining() < Self::ENCODED_LEN {
29015            panic!(
29016                "buffer is too small (need {} bytes, but got {})",
29017                Self::ENCODED_LEN,
29018                __tmp.remaining(),
29019            )
29020        }
29021        __tmp.put_i32_le(self.safe_return);
29022        __tmp.put_i32_le(self.land);
29023        __tmp.put_i32_le(self.mission_next_item);
29024        __tmp.put_i32_le(self.mission_end);
29025        __tmp.put_i32_le(self.commanded_action);
29026        if matches!(version, MavlinkVersion::V2) {
29027            let len = __tmp.len();
29028            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29029        } else {
29030            __tmp.len()
29031        }
29032    }
29033}
29034#[doc = "id: 333"]
29035#[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
29036#[derive(Debug, Clone, PartialEq)]
29037#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29038#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29039pub struct TRAJECTORY_REPRESENTATION_BEZIER_DATA {
29040    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
29041    pub time_usec: u64,
29042    #[doc = "X-coordinate of bezier control points. Set to NaN if not being used"]
29043    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29044    pub pos_x: [f32; 5],
29045    #[doc = "Y-coordinate of bezier control points. Set to NaN if not being used"]
29046    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29047    pub pos_y: [f32; 5],
29048    #[doc = "Z-coordinate of bezier control points. Set to NaN if not being used"]
29049    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29050    pub pos_z: [f32; 5],
29051    #[doc = "Bezier time horizon. Set to NaN if velocity/acceleration should not be incorporated"]
29052    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29053    pub delta: [f32; 5],
29054    #[doc = "Yaw. Set to NaN for unchanged"]
29055    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29056    pub pos_yaw: [f32; 5],
29057    #[doc = "Number of valid control points (up-to 5 points are possible)"]
29058    pub valid_points: u8,
29059}
29060impl TRAJECTORY_REPRESENTATION_BEZIER_DATA {
29061    pub const ENCODED_LEN: usize = 109usize;
29062    pub const DEFAULT: Self = Self {
29063        time_usec: 0_u64,
29064        pos_x: [0.0_f32; 5usize],
29065        pos_y: [0.0_f32; 5usize],
29066        pos_z: [0.0_f32; 5usize],
29067        delta: [0.0_f32; 5usize],
29068        pos_yaw: [0.0_f32; 5usize],
29069        valid_points: 0_u8,
29070    };
29071    #[cfg(feature = "arbitrary")]
29072    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29073        use arbitrary::{Arbitrary, Unstructured};
29074        let mut buf = [0u8; 1024];
29075        rng.fill_bytes(&mut buf);
29076        let mut unstructured = Unstructured::new(&buf);
29077        Self::arbitrary(&mut unstructured).unwrap_or_default()
29078    }
29079}
29080impl Default for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
29081    fn default() -> Self {
29082        Self::DEFAULT.clone()
29083    }
29084}
29085impl MessageData for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
29086    type Message = MavMessage;
29087    const ID: u32 = 333u32;
29088    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_BEZIER";
29089    const EXTRA_CRC: u8 = 231u8;
29090    const ENCODED_LEN: usize = 109usize;
29091    fn deser(
29092        _version: MavlinkVersion,
29093        __input: &[u8],
29094    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29095        let avail_len = __input.len();
29096        let mut payload_buf = [0; Self::ENCODED_LEN];
29097        let mut buf = if avail_len < Self::ENCODED_LEN {
29098            payload_buf[0..avail_len].copy_from_slice(__input);
29099            Bytes::new(&payload_buf)
29100        } else {
29101            Bytes::new(__input)
29102        };
29103        let mut __struct = Self::default();
29104        __struct.time_usec = buf.get_u64_le();
29105        for v in &mut __struct.pos_x {
29106            let val = buf.get_f32_le();
29107            *v = val;
29108        }
29109        for v in &mut __struct.pos_y {
29110            let val = buf.get_f32_le();
29111            *v = val;
29112        }
29113        for v in &mut __struct.pos_z {
29114            let val = buf.get_f32_le();
29115            *v = val;
29116        }
29117        for v in &mut __struct.delta {
29118            let val = buf.get_f32_le();
29119            *v = val;
29120        }
29121        for v in &mut __struct.pos_yaw {
29122            let val = buf.get_f32_le();
29123            *v = val;
29124        }
29125        __struct.valid_points = buf.get_u8();
29126        Ok(__struct)
29127    }
29128    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29129        let mut __tmp = BytesMut::new(bytes);
29130        #[allow(clippy::absurd_extreme_comparisons)]
29131        #[allow(unused_comparisons)]
29132        if __tmp.remaining() < Self::ENCODED_LEN {
29133            panic!(
29134                "buffer is too small (need {} bytes, but got {})",
29135                Self::ENCODED_LEN,
29136                __tmp.remaining(),
29137            )
29138        }
29139        __tmp.put_u64_le(self.time_usec);
29140        for val in &self.pos_x {
29141            __tmp.put_f32_le(*val);
29142        }
29143        for val in &self.pos_y {
29144            __tmp.put_f32_le(*val);
29145        }
29146        for val in &self.pos_z {
29147            __tmp.put_f32_le(*val);
29148        }
29149        for val in &self.delta {
29150            __tmp.put_f32_le(*val);
29151        }
29152        for val in &self.pos_yaw {
29153            __tmp.put_f32_le(*val);
29154        }
29155        __tmp.put_u8(self.valid_points);
29156        if matches!(version, MavlinkVersion::V2) {
29157            let len = __tmp.len();
29158            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29159        } else {
29160            __tmp.len()
29161        }
29162    }
29163}
29164#[doc = "id: 332"]
29165#[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
29166#[derive(Debug, Clone, PartialEq)]
29167#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29168#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29169pub struct TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
29170    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
29171    pub time_usec: u64,
29172    #[doc = "X-coordinate of waypoint, set to NaN if not being used"]
29173    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29174    pub pos_x: [f32; 5],
29175    #[doc = "Y-coordinate of waypoint, set to NaN if not being used"]
29176    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29177    pub pos_y: [f32; 5],
29178    #[doc = "Z-coordinate of waypoint, set to NaN if not being used"]
29179    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29180    pub pos_z: [f32; 5],
29181    #[doc = "X-velocity of waypoint, set to NaN if not being used"]
29182    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29183    pub vel_x: [f32; 5],
29184    #[doc = "Y-velocity of waypoint, set to NaN if not being used"]
29185    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29186    pub vel_y: [f32; 5],
29187    #[doc = "Z-velocity of waypoint, set to NaN if not being used"]
29188    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29189    pub vel_z: [f32; 5],
29190    #[doc = "X-acceleration of waypoint, set to NaN if not being used"]
29191    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29192    pub acc_x: [f32; 5],
29193    #[doc = "Y-acceleration of waypoint, set to NaN if not being used"]
29194    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29195    pub acc_y: [f32; 5],
29196    #[doc = "Z-acceleration of waypoint, set to NaN if not being used"]
29197    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29198    pub acc_z: [f32; 5],
29199    #[doc = "Yaw angle, set to NaN if not being used"]
29200    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29201    pub pos_yaw: [f32; 5],
29202    #[doc = "Yaw rate, set to NaN if not being used"]
29203    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29204    pub vel_yaw: [f32; 5],
29205    #[doc = "MAV_CMD command id of waypoint, set to UINT16_MAX if not being used."]
29206    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29207    pub command: [u16; 5],
29208    #[doc = "Number of valid points (up-to 5 waypoints are possible)"]
29209    pub valid_points: u8,
29210}
29211impl TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
29212    pub const ENCODED_LEN: usize = 239usize;
29213    pub const DEFAULT: Self = Self {
29214        time_usec: 0_u64,
29215        pos_x: [0.0_f32; 5usize],
29216        pos_y: [0.0_f32; 5usize],
29217        pos_z: [0.0_f32; 5usize],
29218        vel_x: [0.0_f32; 5usize],
29219        vel_y: [0.0_f32; 5usize],
29220        vel_z: [0.0_f32; 5usize],
29221        acc_x: [0.0_f32; 5usize],
29222        acc_y: [0.0_f32; 5usize],
29223        acc_z: [0.0_f32; 5usize],
29224        pos_yaw: [0.0_f32; 5usize],
29225        vel_yaw: [0.0_f32; 5usize],
29226        command: [0_u16; 5usize],
29227        valid_points: 0_u8,
29228    };
29229    #[cfg(feature = "arbitrary")]
29230    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29231        use arbitrary::{Arbitrary, Unstructured};
29232        let mut buf = [0u8; 1024];
29233        rng.fill_bytes(&mut buf);
29234        let mut unstructured = Unstructured::new(&buf);
29235        Self::arbitrary(&mut unstructured).unwrap_or_default()
29236    }
29237}
29238impl Default for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
29239    fn default() -> Self {
29240        Self::DEFAULT.clone()
29241    }
29242}
29243impl MessageData for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
29244    type Message = MavMessage;
29245    const ID: u32 = 332u32;
29246    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_WAYPOINTS";
29247    const EXTRA_CRC: u8 = 236u8;
29248    const ENCODED_LEN: usize = 239usize;
29249    fn deser(
29250        _version: MavlinkVersion,
29251        __input: &[u8],
29252    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29253        let avail_len = __input.len();
29254        let mut payload_buf = [0; Self::ENCODED_LEN];
29255        let mut buf = if avail_len < Self::ENCODED_LEN {
29256            payload_buf[0..avail_len].copy_from_slice(__input);
29257            Bytes::new(&payload_buf)
29258        } else {
29259            Bytes::new(__input)
29260        };
29261        let mut __struct = Self::default();
29262        __struct.time_usec = buf.get_u64_le();
29263        for v in &mut __struct.pos_x {
29264            let val = buf.get_f32_le();
29265            *v = val;
29266        }
29267        for v in &mut __struct.pos_y {
29268            let val = buf.get_f32_le();
29269            *v = val;
29270        }
29271        for v in &mut __struct.pos_z {
29272            let val = buf.get_f32_le();
29273            *v = val;
29274        }
29275        for v in &mut __struct.vel_x {
29276            let val = buf.get_f32_le();
29277            *v = val;
29278        }
29279        for v in &mut __struct.vel_y {
29280            let val = buf.get_f32_le();
29281            *v = val;
29282        }
29283        for v in &mut __struct.vel_z {
29284            let val = buf.get_f32_le();
29285            *v = val;
29286        }
29287        for v in &mut __struct.acc_x {
29288            let val = buf.get_f32_le();
29289            *v = val;
29290        }
29291        for v in &mut __struct.acc_y {
29292            let val = buf.get_f32_le();
29293            *v = val;
29294        }
29295        for v in &mut __struct.acc_z {
29296            let val = buf.get_f32_le();
29297            *v = val;
29298        }
29299        for v in &mut __struct.pos_yaw {
29300            let val = buf.get_f32_le();
29301            *v = val;
29302        }
29303        for v in &mut __struct.vel_yaw {
29304            let val = buf.get_f32_le();
29305            *v = val;
29306        }
29307        for v in &mut __struct.command {
29308            let val = buf.get_u16_le();
29309            *v = val;
29310        }
29311        __struct.valid_points = buf.get_u8();
29312        Ok(__struct)
29313    }
29314    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29315        let mut __tmp = BytesMut::new(bytes);
29316        #[allow(clippy::absurd_extreme_comparisons)]
29317        #[allow(unused_comparisons)]
29318        if __tmp.remaining() < Self::ENCODED_LEN {
29319            panic!(
29320                "buffer is too small (need {} bytes, but got {})",
29321                Self::ENCODED_LEN,
29322                __tmp.remaining(),
29323            )
29324        }
29325        __tmp.put_u64_le(self.time_usec);
29326        for val in &self.pos_x {
29327            __tmp.put_f32_le(*val);
29328        }
29329        for val in &self.pos_y {
29330            __tmp.put_f32_le(*val);
29331        }
29332        for val in &self.pos_z {
29333            __tmp.put_f32_le(*val);
29334        }
29335        for val in &self.vel_x {
29336            __tmp.put_f32_le(*val);
29337        }
29338        for val in &self.vel_y {
29339            __tmp.put_f32_le(*val);
29340        }
29341        for val in &self.vel_z {
29342            __tmp.put_f32_le(*val);
29343        }
29344        for val in &self.acc_x {
29345            __tmp.put_f32_le(*val);
29346        }
29347        for val in &self.acc_y {
29348            __tmp.put_f32_le(*val);
29349        }
29350        for val in &self.acc_z {
29351            __tmp.put_f32_le(*val);
29352        }
29353        for val in &self.pos_yaw {
29354            __tmp.put_f32_le(*val);
29355        }
29356        for val in &self.vel_yaw {
29357            __tmp.put_f32_le(*val);
29358        }
29359        for val in &self.command {
29360            __tmp.put_u16_le(*val);
29361        }
29362        __tmp.put_u8(self.valid_points);
29363        if matches!(version, MavlinkVersion::V2) {
29364            let len = __tmp.len();
29365            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29366        } else {
29367            __tmp.len()
29368        }
29369    }
29370}
29371#[doc = "id: 385"]
29372#[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
29373#[derive(Debug, Clone, PartialEq)]
29374#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29375#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29376pub struct TUNNEL_DATA {
29377    #[doc = "A code that identifies the content of the payload (0 for unknown, which is the default). If this code is less than 32768, it is a 'registered' payload type and the corresponding code should be added to the MAV_TUNNEL_PAYLOAD_TYPE enum. Software creators can register blocks of types as needed. Codes greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
29378    pub payload_type: MavTunnelPayloadType,
29379    #[doc = "System ID (can be 0 for broadcast, but this is discouraged)"]
29380    pub target_system: u8,
29381    #[doc = "Component ID (can be 0 for broadcast, but this is discouraged)"]
29382    pub target_component: u8,
29383    #[doc = "Length of the data transported in payload"]
29384    pub payload_length: u8,
29385    #[doc = "Variable length payload. The payload length is defined by payload_length. The entire content of this block is opaque unless you understand the encoding specified by payload_type."]
29386    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29387    pub payload: [u8; 128],
29388}
29389impl TUNNEL_DATA {
29390    pub const ENCODED_LEN: usize = 133usize;
29391    pub const DEFAULT: Self = Self {
29392        payload_type: MavTunnelPayloadType::DEFAULT,
29393        target_system: 0_u8,
29394        target_component: 0_u8,
29395        payload_length: 0_u8,
29396        payload: [0_u8; 128usize],
29397    };
29398    #[cfg(feature = "arbitrary")]
29399    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29400        use arbitrary::{Arbitrary, Unstructured};
29401        let mut buf = [0u8; 1024];
29402        rng.fill_bytes(&mut buf);
29403        let mut unstructured = Unstructured::new(&buf);
29404        Self::arbitrary(&mut unstructured).unwrap_or_default()
29405    }
29406}
29407impl Default for TUNNEL_DATA {
29408    fn default() -> Self {
29409        Self::DEFAULT.clone()
29410    }
29411}
29412impl MessageData for TUNNEL_DATA {
29413    type Message = MavMessage;
29414    const ID: u32 = 385u32;
29415    const NAME: &'static str = "TUNNEL";
29416    const EXTRA_CRC: u8 = 147u8;
29417    const ENCODED_LEN: usize = 133usize;
29418    fn deser(
29419        _version: MavlinkVersion,
29420        __input: &[u8],
29421    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29422        let avail_len = __input.len();
29423        let mut payload_buf = [0; Self::ENCODED_LEN];
29424        let mut buf = if avail_len < Self::ENCODED_LEN {
29425            payload_buf[0..avail_len].copy_from_slice(__input);
29426            Bytes::new(&payload_buf)
29427        } else {
29428            Bytes::new(__input)
29429        };
29430        let mut __struct = Self::default();
29431        let tmp = buf.get_u16_le();
29432        __struct.payload_type = FromPrimitive::from_u16(tmp).ok_or(
29433            ::mavlink_core::error::ParserError::InvalidEnum {
29434                enum_type: "MavTunnelPayloadType",
29435                value: tmp as u32,
29436            },
29437        )?;
29438        __struct.target_system = buf.get_u8();
29439        __struct.target_component = buf.get_u8();
29440        __struct.payload_length = buf.get_u8();
29441        for v in &mut __struct.payload {
29442            let val = buf.get_u8();
29443            *v = val;
29444        }
29445        Ok(__struct)
29446    }
29447    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29448        let mut __tmp = BytesMut::new(bytes);
29449        #[allow(clippy::absurd_extreme_comparisons)]
29450        #[allow(unused_comparisons)]
29451        if __tmp.remaining() < Self::ENCODED_LEN {
29452            panic!(
29453                "buffer is too small (need {} bytes, but got {})",
29454                Self::ENCODED_LEN,
29455                __tmp.remaining(),
29456            )
29457        }
29458        __tmp.put_u16_le(self.payload_type as u16);
29459        __tmp.put_u8(self.target_system);
29460        __tmp.put_u8(self.target_component);
29461        __tmp.put_u8(self.payload_length);
29462        for val in &self.payload {
29463            __tmp.put_u8(*val);
29464        }
29465        if matches!(version, MavlinkVersion::V2) {
29466            let len = __tmp.len();
29467            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29468        } else {
29469            __tmp.len()
29470        }
29471    }
29472}
29473#[doc = "id: 311"]
29474#[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
29475#[derive(Debug, Clone, PartialEq)]
29476#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29477#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29478pub struct UAVCAN_NODE_INFO_DATA {
29479    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
29480    pub time_usec: u64,
29481    #[doc = "Time since the start-up of the node."]
29482    pub uptime_sec: u32,
29483    #[doc = "Version control system (VCS) revision identifier (e.g. git short commit hash). 0 if unknown."]
29484    pub sw_vcs_commit: u32,
29485    #[doc = "Node name string. For example, \"sapog.px4.io\"."]
29486    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29487    pub name: [u8; 80],
29488    #[doc = "Hardware major version number."]
29489    pub hw_version_major: u8,
29490    #[doc = "Hardware minor version number."]
29491    pub hw_version_minor: u8,
29492    #[doc = "Hardware unique 128-bit ID."]
29493    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29494    pub hw_unique_id: [u8; 16],
29495    #[doc = "Software major version number."]
29496    pub sw_version_major: u8,
29497    #[doc = "Software minor version number."]
29498    pub sw_version_minor: u8,
29499}
29500impl UAVCAN_NODE_INFO_DATA {
29501    pub const ENCODED_LEN: usize = 116usize;
29502    pub const DEFAULT: Self = Self {
29503        time_usec: 0_u64,
29504        uptime_sec: 0_u32,
29505        sw_vcs_commit: 0_u32,
29506        name: [0_u8; 80usize],
29507        hw_version_major: 0_u8,
29508        hw_version_minor: 0_u8,
29509        hw_unique_id: [0_u8; 16usize],
29510        sw_version_major: 0_u8,
29511        sw_version_minor: 0_u8,
29512    };
29513    #[cfg(feature = "arbitrary")]
29514    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29515        use arbitrary::{Arbitrary, Unstructured};
29516        let mut buf = [0u8; 1024];
29517        rng.fill_bytes(&mut buf);
29518        let mut unstructured = Unstructured::new(&buf);
29519        Self::arbitrary(&mut unstructured).unwrap_or_default()
29520    }
29521}
29522impl Default for UAVCAN_NODE_INFO_DATA {
29523    fn default() -> Self {
29524        Self::DEFAULT.clone()
29525    }
29526}
29527impl MessageData for UAVCAN_NODE_INFO_DATA {
29528    type Message = MavMessage;
29529    const ID: u32 = 311u32;
29530    const NAME: &'static str = "UAVCAN_NODE_INFO";
29531    const EXTRA_CRC: u8 = 95u8;
29532    const ENCODED_LEN: usize = 116usize;
29533    fn deser(
29534        _version: MavlinkVersion,
29535        __input: &[u8],
29536    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29537        let avail_len = __input.len();
29538        let mut payload_buf = [0; Self::ENCODED_LEN];
29539        let mut buf = if avail_len < Self::ENCODED_LEN {
29540            payload_buf[0..avail_len].copy_from_slice(__input);
29541            Bytes::new(&payload_buf)
29542        } else {
29543            Bytes::new(__input)
29544        };
29545        let mut __struct = Self::default();
29546        __struct.time_usec = buf.get_u64_le();
29547        __struct.uptime_sec = buf.get_u32_le();
29548        __struct.sw_vcs_commit = buf.get_u32_le();
29549        for v in &mut __struct.name {
29550            let val = buf.get_u8();
29551            *v = val;
29552        }
29553        __struct.hw_version_major = buf.get_u8();
29554        __struct.hw_version_minor = buf.get_u8();
29555        for v in &mut __struct.hw_unique_id {
29556            let val = buf.get_u8();
29557            *v = val;
29558        }
29559        __struct.sw_version_major = buf.get_u8();
29560        __struct.sw_version_minor = buf.get_u8();
29561        Ok(__struct)
29562    }
29563    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29564        let mut __tmp = BytesMut::new(bytes);
29565        #[allow(clippy::absurd_extreme_comparisons)]
29566        #[allow(unused_comparisons)]
29567        if __tmp.remaining() < Self::ENCODED_LEN {
29568            panic!(
29569                "buffer is too small (need {} bytes, but got {})",
29570                Self::ENCODED_LEN,
29571                __tmp.remaining(),
29572            )
29573        }
29574        __tmp.put_u64_le(self.time_usec);
29575        __tmp.put_u32_le(self.uptime_sec);
29576        __tmp.put_u32_le(self.sw_vcs_commit);
29577        for val in &self.name {
29578            __tmp.put_u8(*val);
29579        }
29580        __tmp.put_u8(self.hw_version_major);
29581        __tmp.put_u8(self.hw_version_minor);
29582        for val in &self.hw_unique_id {
29583            __tmp.put_u8(*val);
29584        }
29585        __tmp.put_u8(self.sw_version_major);
29586        __tmp.put_u8(self.sw_version_minor);
29587        if matches!(version, MavlinkVersion::V2) {
29588            let len = __tmp.len();
29589            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29590        } else {
29591            __tmp.len()
29592        }
29593    }
29594}
29595#[doc = "id: 310"]
29596#[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
29597#[derive(Debug, Clone, PartialEq)]
29598#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29599#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29600pub struct UAVCAN_NODE_STATUS_DATA {
29601    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
29602    pub time_usec: u64,
29603    #[doc = "Time since the start-up of the node."]
29604    pub uptime_sec: u32,
29605    #[doc = "Vendor-specific status information."]
29606    pub vendor_specific_status_code: u16,
29607    #[doc = "Generalized node health status."]
29608    pub health: UavcanNodeHealth,
29609    #[doc = "Generalized operating mode."]
29610    pub mode: UavcanNodeMode,
29611    #[doc = "Not used currently."]
29612    pub sub_mode: u8,
29613}
29614impl UAVCAN_NODE_STATUS_DATA {
29615    pub const ENCODED_LEN: usize = 17usize;
29616    pub const DEFAULT: Self = Self {
29617        time_usec: 0_u64,
29618        uptime_sec: 0_u32,
29619        vendor_specific_status_code: 0_u16,
29620        health: UavcanNodeHealth::DEFAULT,
29621        mode: UavcanNodeMode::DEFAULT,
29622        sub_mode: 0_u8,
29623    };
29624    #[cfg(feature = "arbitrary")]
29625    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29626        use arbitrary::{Arbitrary, Unstructured};
29627        let mut buf = [0u8; 1024];
29628        rng.fill_bytes(&mut buf);
29629        let mut unstructured = Unstructured::new(&buf);
29630        Self::arbitrary(&mut unstructured).unwrap_or_default()
29631    }
29632}
29633impl Default for UAVCAN_NODE_STATUS_DATA {
29634    fn default() -> Self {
29635        Self::DEFAULT.clone()
29636    }
29637}
29638impl MessageData for UAVCAN_NODE_STATUS_DATA {
29639    type Message = MavMessage;
29640    const ID: u32 = 310u32;
29641    const NAME: &'static str = "UAVCAN_NODE_STATUS";
29642    const EXTRA_CRC: u8 = 28u8;
29643    const ENCODED_LEN: usize = 17usize;
29644    fn deser(
29645        _version: MavlinkVersion,
29646        __input: &[u8],
29647    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29648        let avail_len = __input.len();
29649        let mut payload_buf = [0; Self::ENCODED_LEN];
29650        let mut buf = if avail_len < Self::ENCODED_LEN {
29651            payload_buf[0..avail_len].copy_from_slice(__input);
29652            Bytes::new(&payload_buf)
29653        } else {
29654            Bytes::new(__input)
29655        };
29656        let mut __struct = Self::default();
29657        __struct.time_usec = buf.get_u64_le();
29658        __struct.uptime_sec = buf.get_u32_le();
29659        __struct.vendor_specific_status_code = buf.get_u16_le();
29660        let tmp = buf.get_u8();
29661        __struct.health =
29662            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29663                enum_type: "UavcanNodeHealth",
29664                value: tmp as u32,
29665            })?;
29666        let tmp = buf.get_u8();
29667        __struct.mode =
29668            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29669                enum_type: "UavcanNodeMode",
29670                value: tmp as u32,
29671            })?;
29672        __struct.sub_mode = buf.get_u8();
29673        Ok(__struct)
29674    }
29675    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29676        let mut __tmp = BytesMut::new(bytes);
29677        #[allow(clippy::absurd_extreme_comparisons)]
29678        #[allow(unused_comparisons)]
29679        if __tmp.remaining() < Self::ENCODED_LEN {
29680            panic!(
29681                "buffer is too small (need {} bytes, but got {})",
29682                Self::ENCODED_LEN,
29683                __tmp.remaining(),
29684            )
29685        }
29686        __tmp.put_u64_le(self.time_usec);
29687        __tmp.put_u32_le(self.uptime_sec);
29688        __tmp.put_u16_le(self.vendor_specific_status_code);
29689        __tmp.put_u8(self.health as u8);
29690        __tmp.put_u8(self.mode as u8);
29691        __tmp.put_u8(self.sub_mode);
29692        if matches!(version, MavlinkVersion::V2) {
29693            let len = __tmp.len();
29694            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29695        } else {
29696            __tmp.len()
29697        }
29698    }
29699}
29700#[doc = "id: 10006"]
29701#[doc = "Request messages."]
29702#[derive(Debug, Clone, PartialEq)]
29703#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29704#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29705pub struct UAVIONIX_ADSB_GET_DATA {
29706    #[doc = "Message ID to request. Supports any message in this 10000-10099 range"]
29707    pub ReqMessageId: u32,
29708}
29709impl UAVIONIX_ADSB_GET_DATA {
29710    pub const ENCODED_LEN: usize = 4usize;
29711    pub const DEFAULT: Self = Self {
29712        ReqMessageId: 0_u32,
29713    };
29714    #[cfg(feature = "arbitrary")]
29715    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29716        use arbitrary::{Arbitrary, Unstructured};
29717        let mut buf = [0u8; 1024];
29718        rng.fill_bytes(&mut buf);
29719        let mut unstructured = Unstructured::new(&buf);
29720        Self::arbitrary(&mut unstructured).unwrap_or_default()
29721    }
29722}
29723impl Default for UAVIONIX_ADSB_GET_DATA {
29724    fn default() -> Self {
29725        Self::DEFAULT.clone()
29726    }
29727}
29728impl MessageData for UAVIONIX_ADSB_GET_DATA {
29729    type Message = MavMessage;
29730    const ID: u32 = 10006u32;
29731    const NAME: &'static str = "UAVIONIX_ADSB_GET";
29732    const EXTRA_CRC: u8 = 193u8;
29733    const ENCODED_LEN: usize = 4usize;
29734    fn deser(
29735        _version: MavlinkVersion,
29736        __input: &[u8],
29737    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29738        let avail_len = __input.len();
29739        let mut payload_buf = [0; Self::ENCODED_LEN];
29740        let mut buf = if avail_len < Self::ENCODED_LEN {
29741            payload_buf[0..avail_len].copy_from_slice(__input);
29742            Bytes::new(&payload_buf)
29743        } else {
29744            Bytes::new(__input)
29745        };
29746        let mut __struct = Self::default();
29747        __struct.ReqMessageId = buf.get_u32_le();
29748        Ok(__struct)
29749    }
29750    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29751        let mut __tmp = BytesMut::new(bytes);
29752        #[allow(clippy::absurd_extreme_comparisons)]
29753        #[allow(unused_comparisons)]
29754        if __tmp.remaining() < Self::ENCODED_LEN {
29755            panic!(
29756                "buffer is too small (need {} bytes, but got {})",
29757                Self::ENCODED_LEN,
29758                __tmp.remaining(),
29759            )
29760        }
29761        __tmp.put_u32_le(self.ReqMessageId);
29762        if matches!(version, MavlinkVersion::V2) {
29763            let len = __tmp.len();
29764            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29765        } else {
29766            __tmp.len()
29767        }
29768    }
29769}
29770#[doc = "id: 10001"]
29771#[doc = "Static data to configure the ADS-B transponder (send within 10 sec of a POR and every 10 sec thereafter)."]
29772#[derive(Debug, Clone, PartialEq)]
29773#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29774#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29775pub struct UAVIONIX_ADSB_OUT_CFG_DATA {
29776    #[doc = "Vehicle address (24 bit)"]
29777    pub ICAO: u32,
29778    #[doc = "Aircraft stall speed in cm/s"]
29779    pub stallSpeed: u16,
29780    #[doc = "Vehicle identifier (8 characters, null terminated, valid characters are A-Z, 0-9, \" \" only)"]
29781    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29782    pub callsign: [u8; 9],
29783    #[doc = "Transmitting vehicle type. See ADSB_EMITTER_TYPE enum"]
29784    pub emitterType: AdsbEmitterType,
29785    #[doc = "Aircraft length and width encoding (table 2-35 of DO-282B)"]
29786    pub aircraftSize: UavionixAdsbOutCfgAircraftSize,
29787    #[doc = "GPS antenna lateral offset (table 2-36 of DO-282B)"]
29788    pub gpsOffsetLat: UavionixAdsbOutCfgGpsOffsetLat,
29789    #[doc = "GPS antenna longitudinal offset from nose [if non-zero, take position (in meters) divide by 2 and add one] (table 2-37 DO-282B)"]
29790    pub gpsOffsetLon: UavionixAdsbOutCfgGpsOffsetLon,
29791    #[doc = "ADS-B transponder reciever and transmit enable flags"]
29792    pub rfSelect: UavionixAdsbOutRfSelect,
29793}
29794impl UAVIONIX_ADSB_OUT_CFG_DATA {
29795    pub const ENCODED_LEN: usize = 20usize;
29796    pub const DEFAULT: Self = Self {
29797        ICAO: 0_u32,
29798        stallSpeed: 0_u16,
29799        callsign: [0_u8; 9usize],
29800        emitterType: AdsbEmitterType::DEFAULT,
29801        aircraftSize: UavionixAdsbOutCfgAircraftSize::DEFAULT,
29802        gpsOffsetLat: UavionixAdsbOutCfgGpsOffsetLat::DEFAULT,
29803        gpsOffsetLon: UavionixAdsbOutCfgGpsOffsetLon::DEFAULT,
29804        rfSelect: UavionixAdsbOutRfSelect::DEFAULT,
29805    };
29806    #[cfg(feature = "arbitrary")]
29807    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29808        use arbitrary::{Arbitrary, Unstructured};
29809        let mut buf = [0u8; 1024];
29810        rng.fill_bytes(&mut buf);
29811        let mut unstructured = Unstructured::new(&buf);
29812        Self::arbitrary(&mut unstructured).unwrap_or_default()
29813    }
29814}
29815impl Default for UAVIONIX_ADSB_OUT_CFG_DATA {
29816    fn default() -> Self {
29817        Self::DEFAULT.clone()
29818    }
29819}
29820impl MessageData for UAVIONIX_ADSB_OUT_CFG_DATA {
29821    type Message = MavMessage;
29822    const ID: u32 = 10001u32;
29823    const NAME: &'static str = "UAVIONIX_ADSB_OUT_CFG";
29824    const EXTRA_CRC: u8 = 209u8;
29825    const ENCODED_LEN: usize = 20usize;
29826    fn deser(
29827        _version: MavlinkVersion,
29828        __input: &[u8],
29829    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29830        let avail_len = __input.len();
29831        let mut payload_buf = [0; Self::ENCODED_LEN];
29832        let mut buf = if avail_len < Self::ENCODED_LEN {
29833            payload_buf[0..avail_len].copy_from_slice(__input);
29834            Bytes::new(&payload_buf)
29835        } else {
29836            Bytes::new(__input)
29837        };
29838        let mut __struct = Self::default();
29839        __struct.ICAO = buf.get_u32_le();
29840        __struct.stallSpeed = buf.get_u16_le();
29841        for v in &mut __struct.callsign {
29842            let val = buf.get_u8();
29843            *v = val;
29844        }
29845        let tmp = buf.get_u8();
29846        __struct.emitterType =
29847            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29848                enum_type: "AdsbEmitterType",
29849                value: tmp as u32,
29850            })?;
29851        let tmp = buf.get_u8();
29852        __struct.aircraftSize =
29853            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29854                enum_type: "UavionixAdsbOutCfgAircraftSize",
29855                value: tmp as u32,
29856            })?;
29857        let tmp = buf.get_u8();
29858        __struct.gpsOffsetLat =
29859            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29860                enum_type: "UavionixAdsbOutCfgGpsOffsetLat",
29861                value: tmp as u32,
29862            })?;
29863        let tmp = buf.get_u8();
29864        __struct.gpsOffsetLon =
29865            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29866                enum_type: "UavionixAdsbOutCfgGpsOffsetLon",
29867                value: tmp as u32,
29868            })?;
29869        let tmp = buf.get_u8();
29870        __struct.rfSelect = UavionixAdsbOutRfSelect::from_bits(
29871            tmp & UavionixAdsbOutRfSelect::all().bits(),
29872        )
29873        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29874            flag_type: "UavionixAdsbOutRfSelect",
29875            value: tmp as u32,
29876        })?;
29877        Ok(__struct)
29878    }
29879    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29880        let mut __tmp = BytesMut::new(bytes);
29881        #[allow(clippy::absurd_extreme_comparisons)]
29882        #[allow(unused_comparisons)]
29883        if __tmp.remaining() < Self::ENCODED_LEN {
29884            panic!(
29885                "buffer is too small (need {} bytes, but got {})",
29886                Self::ENCODED_LEN,
29887                __tmp.remaining(),
29888            )
29889        }
29890        __tmp.put_u32_le(self.ICAO);
29891        __tmp.put_u16_le(self.stallSpeed);
29892        for val in &self.callsign {
29893            __tmp.put_u8(*val);
29894        }
29895        __tmp.put_u8(self.emitterType as u8);
29896        __tmp.put_u8(self.aircraftSize as u8);
29897        __tmp.put_u8(self.gpsOffsetLat as u8);
29898        __tmp.put_u8(self.gpsOffsetLon as u8);
29899        __tmp.put_u8(self.rfSelect.bits());
29900        if matches!(version, MavlinkVersion::V2) {
29901            let len = __tmp.len();
29902            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29903        } else {
29904            __tmp.len()
29905        }
29906    }
29907}
29908#[doc = "id: 10005"]
29909#[doc = "Flight Identification for ADSB-Out vehicles."]
29910#[derive(Debug, Clone, PartialEq)]
29911#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29912#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29913pub struct UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA {
29914    #[doc = "Flight Identification: 8 ASCII characters, '0' through '9', 'A' through 'Z' or space. Spaces (0x20) used as a trailing pad character, or when call sign is unavailable. Reflects Control message setting. This is null-terminated."]
29915    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29916    pub flight_id: [u8; 9],
29917}
29918impl UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA {
29919    pub const ENCODED_LEN: usize = 9usize;
29920    pub const DEFAULT: Self = Self {
29921        flight_id: [0_u8; 9usize],
29922    };
29923    #[cfg(feature = "arbitrary")]
29924    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29925        use arbitrary::{Arbitrary, Unstructured};
29926        let mut buf = [0u8; 1024];
29927        rng.fill_bytes(&mut buf);
29928        let mut unstructured = Unstructured::new(&buf);
29929        Self::arbitrary(&mut unstructured).unwrap_or_default()
29930    }
29931}
29932impl Default for UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA {
29933    fn default() -> Self {
29934        Self::DEFAULT.clone()
29935    }
29936}
29937impl MessageData for UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA {
29938    type Message = MavMessage;
29939    const ID: u32 = 10005u32;
29940    const NAME: &'static str = "UAVIONIX_ADSB_OUT_CFG_FLIGHTID";
29941    const EXTRA_CRC: u8 = 103u8;
29942    const ENCODED_LEN: usize = 9usize;
29943    fn deser(
29944        _version: MavlinkVersion,
29945        __input: &[u8],
29946    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29947        let avail_len = __input.len();
29948        let mut payload_buf = [0; Self::ENCODED_LEN];
29949        let mut buf = if avail_len < Self::ENCODED_LEN {
29950            payload_buf[0..avail_len].copy_from_slice(__input);
29951            Bytes::new(&payload_buf)
29952        } else {
29953            Bytes::new(__input)
29954        };
29955        let mut __struct = Self::default();
29956        for v in &mut __struct.flight_id {
29957            let val = buf.get_u8();
29958            *v = val;
29959        }
29960        Ok(__struct)
29961    }
29962    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29963        let mut __tmp = BytesMut::new(bytes);
29964        #[allow(clippy::absurd_extreme_comparisons)]
29965        #[allow(unused_comparisons)]
29966        if __tmp.remaining() < Self::ENCODED_LEN {
29967            panic!(
29968                "buffer is too small (need {} bytes, but got {})",
29969                Self::ENCODED_LEN,
29970                __tmp.remaining(),
29971            )
29972        }
29973        for val in &self.flight_id {
29974            __tmp.put_u8(*val);
29975        }
29976        if matches!(version, MavlinkVersion::V2) {
29977            let len = __tmp.len();
29978            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29979        } else {
29980            __tmp.len()
29981        }
29982    }
29983}
29984#[doc = "id: 10004"]
29985#[doc = "Aircraft Registration."]
29986#[derive(Debug, Clone, PartialEq)]
29987#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29988#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29989pub struct UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA {
29990    #[doc = "Aircraft Registration (ASCII string A-Z, 0-9 only), e.g. \"N8644B \". Trailing spaces (0x20) only. This is null-terminated."]
29991    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29992    pub registration: [u8; 9],
29993}
29994impl UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA {
29995    pub const ENCODED_LEN: usize = 9usize;
29996    pub const DEFAULT: Self = Self {
29997        registration: [0_u8; 9usize],
29998    };
29999    #[cfg(feature = "arbitrary")]
30000    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30001        use arbitrary::{Arbitrary, Unstructured};
30002        let mut buf = [0u8; 1024];
30003        rng.fill_bytes(&mut buf);
30004        let mut unstructured = Unstructured::new(&buf);
30005        Self::arbitrary(&mut unstructured).unwrap_or_default()
30006    }
30007}
30008impl Default for UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA {
30009    fn default() -> Self {
30010        Self::DEFAULT.clone()
30011    }
30012}
30013impl MessageData for UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA {
30014    type Message = MavMessage;
30015    const ID: u32 = 10004u32;
30016    const NAME: &'static str = "UAVIONIX_ADSB_OUT_CFG_REGISTRATION";
30017    const EXTRA_CRC: u8 = 133u8;
30018    const ENCODED_LEN: usize = 9usize;
30019    fn deser(
30020        _version: MavlinkVersion,
30021        __input: &[u8],
30022    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30023        let avail_len = __input.len();
30024        let mut payload_buf = [0; Self::ENCODED_LEN];
30025        let mut buf = if avail_len < Self::ENCODED_LEN {
30026            payload_buf[0..avail_len].copy_from_slice(__input);
30027            Bytes::new(&payload_buf)
30028        } else {
30029            Bytes::new(__input)
30030        };
30031        let mut __struct = Self::default();
30032        for v in &mut __struct.registration {
30033            let val = buf.get_u8();
30034            *v = val;
30035        }
30036        Ok(__struct)
30037    }
30038    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30039        let mut __tmp = BytesMut::new(bytes);
30040        #[allow(clippy::absurd_extreme_comparisons)]
30041        #[allow(unused_comparisons)]
30042        if __tmp.remaining() < Self::ENCODED_LEN {
30043            panic!(
30044                "buffer is too small (need {} bytes, but got {})",
30045                Self::ENCODED_LEN,
30046                __tmp.remaining(),
30047            )
30048        }
30049        for val in &self.registration {
30050            __tmp.put_u8(*val);
30051        }
30052        if matches!(version, MavlinkVersion::V2) {
30053            let len = __tmp.len();
30054            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30055        } else {
30056            __tmp.len()
30057        }
30058    }
30059}
30060#[doc = "id: 10007"]
30061#[doc = "Control message with all data sent in UCP control message."]
30062#[derive(Debug, Clone, PartialEq)]
30063#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30064#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30065pub struct UAVIONIX_ADSB_OUT_CONTROL_DATA {
30066    #[doc = "Barometric pressure altitude (MSL) relative to a standard atmosphere of 1013.2 mBar and NOT bar corrected altitude (m * 1E-3). (up +ve). If unknown set to INT32_MAX"]
30067    pub baroAltMSL: i32,
30068    #[doc = "Mode A code (typically 1200 [0x04B0] for VFR)"]
30069    pub squawk: u16,
30070    #[doc = "ADS-B transponder control state flags"]
30071    pub state: UavionixAdsbOutControlState,
30072    #[doc = "Emergency status"]
30073    pub emergencyStatus: UavionixAdsbEmergencyStatus,
30074    #[doc = "Flight Identification: 8 ASCII characters, '0' through '9', 'A' through 'Z' or space. Spaces (0x20) used as a trailing pad character, or when call sign is unavailable."]
30075    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30076    pub flight_id: [u8; 8],
30077    #[doc = "X-Bit enable (military transponders only)"]
30078    pub x_bit: UavionixAdsbXbit,
30079}
30080impl UAVIONIX_ADSB_OUT_CONTROL_DATA {
30081    pub const ENCODED_LEN: usize = 17usize;
30082    pub const DEFAULT: Self = Self {
30083        baroAltMSL: 0_i32,
30084        squawk: 0_u16,
30085        state: UavionixAdsbOutControlState::DEFAULT,
30086        emergencyStatus: UavionixAdsbEmergencyStatus::DEFAULT,
30087        flight_id: [0_u8; 8usize],
30088        x_bit: UavionixAdsbXbit::DEFAULT,
30089    };
30090    #[cfg(feature = "arbitrary")]
30091    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30092        use arbitrary::{Arbitrary, Unstructured};
30093        let mut buf = [0u8; 1024];
30094        rng.fill_bytes(&mut buf);
30095        let mut unstructured = Unstructured::new(&buf);
30096        Self::arbitrary(&mut unstructured).unwrap_or_default()
30097    }
30098}
30099impl Default for UAVIONIX_ADSB_OUT_CONTROL_DATA {
30100    fn default() -> Self {
30101        Self::DEFAULT.clone()
30102    }
30103}
30104impl MessageData for UAVIONIX_ADSB_OUT_CONTROL_DATA {
30105    type Message = MavMessage;
30106    const ID: u32 = 10007u32;
30107    const NAME: &'static str = "UAVIONIX_ADSB_OUT_CONTROL";
30108    const EXTRA_CRC: u8 = 71u8;
30109    const ENCODED_LEN: usize = 17usize;
30110    fn deser(
30111        _version: MavlinkVersion,
30112        __input: &[u8],
30113    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30114        let avail_len = __input.len();
30115        let mut payload_buf = [0; Self::ENCODED_LEN];
30116        let mut buf = if avail_len < Self::ENCODED_LEN {
30117            payload_buf[0..avail_len].copy_from_slice(__input);
30118            Bytes::new(&payload_buf)
30119        } else {
30120            Bytes::new(__input)
30121        };
30122        let mut __struct = Self::default();
30123        __struct.baroAltMSL = buf.get_i32_le();
30124        __struct.squawk = buf.get_u16_le();
30125        let tmp = buf.get_u8();
30126        __struct.state =
30127            UavionixAdsbOutControlState::from_bits(tmp & UavionixAdsbOutControlState::all().bits())
30128                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30129                    flag_type: "UavionixAdsbOutControlState",
30130                    value: tmp as u32,
30131                })?;
30132        let tmp = buf.get_u8();
30133        __struct.emergencyStatus =
30134            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30135                enum_type: "UavionixAdsbEmergencyStatus",
30136                value: tmp as u32,
30137            })?;
30138        for v in &mut __struct.flight_id {
30139            let val = buf.get_u8();
30140            *v = val;
30141        }
30142        let tmp = buf.get_u8();
30143        __struct.x_bit = UavionixAdsbXbit::from_bits(tmp & UavionixAdsbXbit::all().bits()).ok_or(
30144            ::mavlink_core::error::ParserError::InvalidFlag {
30145                flag_type: "UavionixAdsbXbit",
30146                value: tmp as u32,
30147            },
30148        )?;
30149        Ok(__struct)
30150    }
30151    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30152        let mut __tmp = BytesMut::new(bytes);
30153        #[allow(clippy::absurd_extreme_comparisons)]
30154        #[allow(unused_comparisons)]
30155        if __tmp.remaining() < Self::ENCODED_LEN {
30156            panic!(
30157                "buffer is too small (need {} bytes, but got {})",
30158                Self::ENCODED_LEN,
30159                __tmp.remaining(),
30160            )
30161        }
30162        __tmp.put_i32_le(self.baroAltMSL);
30163        __tmp.put_u16_le(self.squawk);
30164        __tmp.put_u8(self.state.bits());
30165        __tmp.put_u8(self.emergencyStatus as u8);
30166        for val in &self.flight_id {
30167            __tmp.put_u8(*val);
30168        }
30169        __tmp.put_u8(self.x_bit.bits());
30170        if matches!(version, MavlinkVersion::V2) {
30171            let len = __tmp.len();
30172            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30173        } else {
30174            __tmp.len()
30175        }
30176    }
30177}
30178#[doc = "id: 10002"]
30179#[doc = "Dynamic data used to generate ADS-B out transponder data (send at 5Hz)."]
30180#[derive(Debug, Clone, PartialEq)]
30181#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30182#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30183pub struct UAVIONIX_ADSB_OUT_DYNAMIC_DATA {
30184    #[doc = "UTC time in seconds since GPS epoch (Jan 6, 1980). If unknown set to UINT32_MAX"]
30185    pub utcTime: u32,
30186    #[doc = "Latitude WGS84 (deg * 1E7). If unknown set to INT32_MAX"]
30187    pub gpsLat: i32,
30188    #[doc = "Longitude WGS84 (deg * 1E7). If unknown set to INT32_MAX"]
30189    pub gpsLon: i32,
30190    #[doc = "Altitude (WGS84). UP +ve. If unknown set to INT32_MAX"]
30191    pub gpsAlt: i32,
30192    #[doc = "Barometric pressure altitude (MSL) relative to a standard atmosphere of 1013.2 mBar and NOT bar corrected altitude (m * 1E-3). (up +ve). If unknown set to INT32_MAX"]
30193    pub baroAltMSL: i32,
30194    #[doc = "Horizontal accuracy in mm (m * 1E-3). If unknown set to UINT32_MAX"]
30195    pub accuracyHor: u32,
30196    #[doc = "Vertical accuracy in cm. If unknown set to UINT16_MAX"]
30197    pub accuracyVert: u16,
30198    #[doc = "Velocity accuracy in mm/s (m * 1E-3). If unknown set to UINT16_MAX"]
30199    pub accuracyVel: u16,
30200    #[doc = "GPS vertical speed in cm/s. If unknown set to INT16_MAX"]
30201    pub velVert: i16,
30202    #[doc = "North-South velocity over ground in cm/s North +ve. If unknown set to INT16_MAX"]
30203    pub velNS: i16,
30204    #[doc = "East-West velocity over ground in cm/s East +ve. If unknown set to INT16_MAX"]
30205    pub VelEW: i16,
30206    #[doc = "ADS-B transponder dynamic input state flags"]
30207    pub state: UavionixAdsbOutDynamicState,
30208    #[doc = "Mode A code (typically 1200 [0x04B0] for VFR)"]
30209    pub squawk: u16,
30210    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix, 4: DGPS, 5: RTK"]
30211    pub gpsFix: UavionixAdsbOutDynamicGpsFix,
30212    #[doc = "Number of satellites visible. If unknown set to UINT8_MAX"]
30213    pub numSats: u8,
30214    #[doc = "Emergency status"]
30215    pub emergencyStatus: UavionixAdsbEmergencyStatus,
30216}
30217impl UAVIONIX_ADSB_OUT_DYNAMIC_DATA {
30218    pub const ENCODED_LEN: usize = 41usize;
30219    pub const DEFAULT: Self = Self {
30220        utcTime: 0_u32,
30221        gpsLat: 0_i32,
30222        gpsLon: 0_i32,
30223        gpsAlt: 0_i32,
30224        baroAltMSL: 0_i32,
30225        accuracyHor: 0_u32,
30226        accuracyVert: 0_u16,
30227        accuracyVel: 0_u16,
30228        velVert: 0_i16,
30229        velNS: 0_i16,
30230        VelEW: 0_i16,
30231        state: UavionixAdsbOutDynamicState::DEFAULT,
30232        squawk: 0_u16,
30233        gpsFix: UavionixAdsbOutDynamicGpsFix::DEFAULT,
30234        numSats: 0_u8,
30235        emergencyStatus: UavionixAdsbEmergencyStatus::DEFAULT,
30236    };
30237    #[cfg(feature = "arbitrary")]
30238    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30239        use arbitrary::{Arbitrary, Unstructured};
30240        let mut buf = [0u8; 1024];
30241        rng.fill_bytes(&mut buf);
30242        let mut unstructured = Unstructured::new(&buf);
30243        Self::arbitrary(&mut unstructured).unwrap_or_default()
30244    }
30245}
30246impl Default for UAVIONIX_ADSB_OUT_DYNAMIC_DATA {
30247    fn default() -> Self {
30248        Self::DEFAULT.clone()
30249    }
30250}
30251impl MessageData for UAVIONIX_ADSB_OUT_DYNAMIC_DATA {
30252    type Message = MavMessage;
30253    const ID: u32 = 10002u32;
30254    const NAME: &'static str = "UAVIONIX_ADSB_OUT_DYNAMIC";
30255    const EXTRA_CRC: u8 = 186u8;
30256    const ENCODED_LEN: usize = 41usize;
30257    fn deser(
30258        _version: MavlinkVersion,
30259        __input: &[u8],
30260    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30261        let avail_len = __input.len();
30262        let mut payload_buf = [0; Self::ENCODED_LEN];
30263        let mut buf = if avail_len < Self::ENCODED_LEN {
30264            payload_buf[0..avail_len].copy_from_slice(__input);
30265            Bytes::new(&payload_buf)
30266        } else {
30267            Bytes::new(__input)
30268        };
30269        let mut __struct = Self::default();
30270        __struct.utcTime = buf.get_u32_le();
30271        __struct.gpsLat = buf.get_i32_le();
30272        __struct.gpsLon = buf.get_i32_le();
30273        __struct.gpsAlt = buf.get_i32_le();
30274        __struct.baroAltMSL = buf.get_i32_le();
30275        __struct.accuracyHor = buf.get_u32_le();
30276        __struct.accuracyVert = buf.get_u16_le();
30277        __struct.accuracyVel = buf.get_u16_le();
30278        __struct.velVert = buf.get_i16_le();
30279        __struct.velNS = buf.get_i16_le();
30280        __struct.VelEW = buf.get_i16_le();
30281        let tmp = buf.get_u16_le();
30282        __struct.state =
30283            UavionixAdsbOutDynamicState::from_bits(tmp & UavionixAdsbOutDynamicState::all().bits())
30284                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30285                    flag_type: "UavionixAdsbOutDynamicState",
30286                    value: tmp as u32,
30287                })?;
30288        __struct.squawk = buf.get_u16_le();
30289        let tmp = buf.get_u8();
30290        __struct.gpsFix =
30291            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30292                enum_type: "UavionixAdsbOutDynamicGpsFix",
30293                value: tmp as u32,
30294            })?;
30295        __struct.numSats = buf.get_u8();
30296        let tmp = buf.get_u8();
30297        __struct.emergencyStatus =
30298            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30299                enum_type: "UavionixAdsbEmergencyStatus",
30300                value: tmp as u32,
30301            })?;
30302        Ok(__struct)
30303    }
30304    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30305        let mut __tmp = BytesMut::new(bytes);
30306        #[allow(clippy::absurd_extreme_comparisons)]
30307        #[allow(unused_comparisons)]
30308        if __tmp.remaining() < Self::ENCODED_LEN {
30309            panic!(
30310                "buffer is too small (need {} bytes, but got {})",
30311                Self::ENCODED_LEN,
30312                __tmp.remaining(),
30313            )
30314        }
30315        __tmp.put_u32_le(self.utcTime);
30316        __tmp.put_i32_le(self.gpsLat);
30317        __tmp.put_i32_le(self.gpsLon);
30318        __tmp.put_i32_le(self.gpsAlt);
30319        __tmp.put_i32_le(self.baroAltMSL);
30320        __tmp.put_u32_le(self.accuracyHor);
30321        __tmp.put_u16_le(self.accuracyVert);
30322        __tmp.put_u16_le(self.accuracyVel);
30323        __tmp.put_i16_le(self.velVert);
30324        __tmp.put_i16_le(self.velNS);
30325        __tmp.put_i16_le(self.VelEW);
30326        __tmp.put_u16_le(self.state.bits());
30327        __tmp.put_u16_le(self.squawk);
30328        __tmp.put_u8(self.gpsFix as u8);
30329        __tmp.put_u8(self.numSats);
30330        __tmp.put_u8(self.emergencyStatus as u8);
30331        if matches!(version, MavlinkVersion::V2) {
30332            let len = __tmp.len();
30333            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30334        } else {
30335            __tmp.len()
30336        }
30337    }
30338}
30339#[doc = "id: 10008"]
30340#[doc = "Status message with information from UCP Heartbeat and Status messages."]
30341#[derive(Debug, Clone, PartialEq)]
30342#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30343#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30344pub struct UAVIONIX_ADSB_OUT_STATUS_DATA {
30345    #[doc = "Mode A code (typically 1200 [0x04B0] for VFR)"]
30346    pub squawk: u16,
30347    #[doc = "ADS-B transponder status state flags"]
30348    pub state: UavionixAdsbOutStatusState,
30349    #[doc = "Integrity and Accuracy of traffic reported as a 4-bit value for each field (NACp 7:4, NIC 3:0) and encoded by Containment Radius (HPL) and Estimated Position Uncertainty (HFOM), respectively"]
30350    pub NIC_NACp: UavionixAdsbOutStatusNicNacp,
30351    #[doc = "Board temperature in C"]
30352    pub boardTemp: u8,
30353    #[doc = "ADS-B transponder fault flags"]
30354    pub fault: UavionixAdsbOutStatusFault,
30355    #[doc = "Flight Identification: 8 ASCII characters, '0' through '9', 'A' through 'Z' or space. Spaces (0x20) used as a trailing pad character, or when call sign is unavailable."]
30356    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30357    pub flight_id: [u8; 8],
30358}
30359impl UAVIONIX_ADSB_OUT_STATUS_DATA {
30360    pub const ENCODED_LEN: usize = 14usize;
30361    pub const DEFAULT: Self = Self {
30362        squawk: 0_u16,
30363        state: UavionixAdsbOutStatusState::DEFAULT,
30364        NIC_NACp: UavionixAdsbOutStatusNicNacp::DEFAULT,
30365        boardTemp: 0_u8,
30366        fault: UavionixAdsbOutStatusFault::DEFAULT,
30367        flight_id: [0_u8; 8usize],
30368    };
30369    #[cfg(feature = "arbitrary")]
30370    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30371        use arbitrary::{Arbitrary, Unstructured};
30372        let mut buf = [0u8; 1024];
30373        rng.fill_bytes(&mut buf);
30374        let mut unstructured = Unstructured::new(&buf);
30375        Self::arbitrary(&mut unstructured).unwrap_or_default()
30376    }
30377}
30378impl Default for UAVIONIX_ADSB_OUT_STATUS_DATA {
30379    fn default() -> Self {
30380        Self::DEFAULT.clone()
30381    }
30382}
30383impl MessageData for UAVIONIX_ADSB_OUT_STATUS_DATA {
30384    type Message = MavMessage;
30385    const ID: u32 = 10008u32;
30386    const NAME: &'static str = "UAVIONIX_ADSB_OUT_STATUS";
30387    const EXTRA_CRC: u8 = 240u8;
30388    const ENCODED_LEN: usize = 14usize;
30389    fn deser(
30390        _version: MavlinkVersion,
30391        __input: &[u8],
30392    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30393        let avail_len = __input.len();
30394        let mut payload_buf = [0; Self::ENCODED_LEN];
30395        let mut buf = if avail_len < Self::ENCODED_LEN {
30396            payload_buf[0..avail_len].copy_from_slice(__input);
30397            Bytes::new(&payload_buf)
30398        } else {
30399            Bytes::new(__input)
30400        };
30401        let mut __struct = Self::default();
30402        __struct.squawk = buf.get_u16_le();
30403        let tmp = buf.get_u8();
30404        __struct.state =
30405            UavionixAdsbOutStatusState::from_bits(tmp & UavionixAdsbOutStatusState::all().bits())
30406                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30407                flag_type: "UavionixAdsbOutStatusState",
30408                value: tmp as u32,
30409            })?;
30410        let tmp = buf.get_u8();
30411        __struct.NIC_NACp =
30412            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30413                enum_type: "UavionixAdsbOutStatusNicNacp",
30414                value: tmp as u32,
30415            })?;
30416        __struct.boardTemp = buf.get_u8();
30417        let tmp = buf.get_u8();
30418        __struct.fault =
30419            UavionixAdsbOutStatusFault::from_bits(tmp & UavionixAdsbOutStatusFault::all().bits())
30420                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30421                flag_type: "UavionixAdsbOutStatusFault",
30422                value: tmp as u32,
30423            })?;
30424        for v in &mut __struct.flight_id {
30425            let val = buf.get_u8();
30426            *v = val;
30427        }
30428        Ok(__struct)
30429    }
30430    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30431        let mut __tmp = BytesMut::new(bytes);
30432        #[allow(clippy::absurd_extreme_comparisons)]
30433        #[allow(unused_comparisons)]
30434        if __tmp.remaining() < Self::ENCODED_LEN {
30435            panic!(
30436                "buffer is too small (need {} bytes, but got {})",
30437                Self::ENCODED_LEN,
30438                __tmp.remaining(),
30439            )
30440        }
30441        __tmp.put_u16_le(self.squawk);
30442        __tmp.put_u8(self.state.bits());
30443        __tmp.put_u8(self.NIC_NACp as u8);
30444        __tmp.put_u8(self.boardTemp);
30445        __tmp.put_u8(self.fault.bits());
30446        for val in &self.flight_id {
30447            __tmp.put_u8(*val);
30448        }
30449        if matches!(version, MavlinkVersion::V2) {
30450            let len = __tmp.len();
30451            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30452        } else {
30453            __tmp.len()
30454        }
30455    }
30456}
30457#[doc = "id: 10003"]
30458#[doc = "Transceiver heartbeat with health report (updated every 10s)."]
30459#[derive(Debug, Clone, PartialEq)]
30460#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30461#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30462pub struct UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA {
30463    #[doc = "ADS-B transponder messages"]
30464    pub rfHealth: UavionixAdsbRfHealth,
30465}
30466impl UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA {
30467    pub const ENCODED_LEN: usize = 1usize;
30468    pub const DEFAULT: Self = Self {
30469        rfHealth: UavionixAdsbRfHealth::DEFAULT,
30470    };
30471    #[cfg(feature = "arbitrary")]
30472    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30473        use arbitrary::{Arbitrary, Unstructured};
30474        let mut buf = [0u8; 1024];
30475        rng.fill_bytes(&mut buf);
30476        let mut unstructured = Unstructured::new(&buf);
30477        Self::arbitrary(&mut unstructured).unwrap_or_default()
30478    }
30479}
30480impl Default for UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA {
30481    fn default() -> Self {
30482        Self::DEFAULT.clone()
30483    }
30484}
30485impl MessageData for UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA {
30486    type Message = MavMessage;
30487    const ID: u32 = 10003u32;
30488    const NAME: &'static str = "UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT";
30489    const EXTRA_CRC: u8 = 4u8;
30490    const ENCODED_LEN: usize = 1usize;
30491    fn deser(
30492        _version: MavlinkVersion,
30493        __input: &[u8],
30494    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30495        let avail_len = __input.len();
30496        let mut payload_buf = [0; Self::ENCODED_LEN];
30497        let mut buf = if avail_len < Self::ENCODED_LEN {
30498            payload_buf[0..avail_len].copy_from_slice(__input);
30499            Bytes::new(&payload_buf)
30500        } else {
30501            Bytes::new(__input)
30502        };
30503        let mut __struct = Self::default();
30504        let tmp = buf.get_u8();
30505        __struct.rfHealth = UavionixAdsbRfHealth::from_bits(
30506            tmp & UavionixAdsbRfHealth::all().bits(),
30507        )
30508        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30509            flag_type: "UavionixAdsbRfHealth",
30510            value: tmp as u32,
30511        })?;
30512        Ok(__struct)
30513    }
30514    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30515        let mut __tmp = BytesMut::new(bytes);
30516        #[allow(clippy::absurd_extreme_comparisons)]
30517        #[allow(unused_comparisons)]
30518        if __tmp.remaining() < Self::ENCODED_LEN {
30519            panic!(
30520                "buffer is too small (need {} bytes, but got {})",
30521                Self::ENCODED_LEN,
30522                __tmp.remaining(),
30523            )
30524        }
30525        __tmp.put_u8(self.rfHealth.bits());
30526        if matches!(version, MavlinkVersion::V2) {
30527            let len = __tmp.len();
30528            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30529        } else {
30530            __tmp.len()
30531        }
30532    }
30533}
30534#[doc = "id: 340"]
30535#[doc = "The global position resulting from GPS and sensor fusion."]
30536#[derive(Debug, Clone, PartialEq)]
30537#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30538#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30539pub struct UTM_GLOBAL_POSITION_DATA {
30540    #[doc = "Time of applicability of position (microseconds since UNIX epoch)."]
30541    pub time: u64,
30542    #[doc = "Latitude (WGS84)"]
30543    pub lat: i32,
30544    #[doc = "Longitude (WGS84)"]
30545    pub lon: i32,
30546    #[doc = "Altitude (WGS84)"]
30547    pub alt: i32,
30548    #[doc = "Altitude above ground"]
30549    pub relative_alt: i32,
30550    #[doc = "Next waypoint, latitude (WGS84)"]
30551    pub next_lat: i32,
30552    #[doc = "Next waypoint, longitude (WGS84)"]
30553    pub next_lon: i32,
30554    #[doc = "Next waypoint, altitude (WGS84)"]
30555    pub next_alt: i32,
30556    #[doc = "Ground X speed (latitude, positive north)"]
30557    pub vx: i16,
30558    #[doc = "Ground Y speed (longitude, positive east)"]
30559    pub vy: i16,
30560    #[doc = "Ground Z speed (altitude, positive down)"]
30561    pub vz: i16,
30562    #[doc = "Horizontal position uncertainty (standard deviation)"]
30563    pub h_acc: u16,
30564    #[doc = "Altitude uncertainty (standard deviation)"]
30565    pub v_acc: u16,
30566    #[doc = "Speed uncertainty (standard deviation)"]
30567    pub vel_acc: u16,
30568    #[doc = "Time until next update. Set to 0 if unknown or in data driven mode."]
30569    pub update_rate: u16,
30570    #[doc = "Unique UAS ID."]
30571    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30572    pub uas_id: [u8; 18],
30573    #[doc = "Flight state"]
30574    pub flight_state: UtmFlightState,
30575    #[doc = "Bitwise OR combination of the data available flags."]
30576    pub flags: UtmDataAvailFlags,
30577}
30578impl UTM_GLOBAL_POSITION_DATA {
30579    pub const ENCODED_LEN: usize = 70usize;
30580    pub const DEFAULT: Self = Self {
30581        time: 0_u64,
30582        lat: 0_i32,
30583        lon: 0_i32,
30584        alt: 0_i32,
30585        relative_alt: 0_i32,
30586        next_lat: 0_i32,
30587        next_lon: 0_i32,
30588        next_alt: 0_i32,
30589        vx: 0_i16,
30590        vy: 0_i16,
30591        vz: 0_i16,
30592        h_acc: 0_u16,
30593        v_acc: 0_u16,
30594        vel_acc: 0_u16,
30595        update_rate: 0_u16,
30596        uas_id: [0_u8; 18usize],
30597        flight_state: UtmFlightState::DEFAULT,
30598        flags: UtmDataAvailFlags::DEFAULT,
30599    };
30600    #[cfg(feature = "arbitrary")]
30601    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30602        use arbitrary::{Arbitrary, Unstructured};
30603        let mut buf = [0u8; 1024];
30604        rng.fill_bytes(&mut buf);
30605        let mut unstructured = Unstructured::new(&buf);
30606        Self::arbitrary(&mut unstructured).unwrap_or_default()
30607    }
30608}
30609impl Default for UTM_GLOBAL_POSITION_DATA {
30610    fn default() -> Self {
30611        Self::DEFAULT.clone()
30612    }
30613}
30614impl MessageData for UTM_GLOBAL_POSITION_DATA {
30615    type Message = MavMessage;
30616    const ID: u32 = 340u32;
30617    const NAME: &'static str = "UTM_GLOBAL_POSITION";
30618    const EXTRA_CRC: u8 = 99u8;
30619    const ENCODED_LEN: usize = 70usize;
30620    fn deser(
30621        _version: MavlinkVersion,
30622        __input: &[u8],
30623    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30624        let avail_len = __input.len();
30625        let mut payload_buf = [0; Self::ENCODED_LEN];
30626        let mut buf = if avail_len < Self::ENCODED_LEN {
30627            payload_buf[0..avail_len].copy_from_slice(__input);
30628            Bytes::new(&payload_buf)
30629        } else {
30630            Bytes::new(__input)
30631        };
30632        let mut __struct = Self::default();
30633        __struct.time = buf.get_u64_le();
30634        __struct.lat = buf.get_i32_le();
30635        __struct.lon = buf.get_i32_le();
30636        __struct.alt = buf.get_i32_le();
30637        __struct.relative_alt = buf.get_i32_le();
30638        __struct.next_lat = buf.get_i32_le();
30639        __struct.next_lon = buf.get_i32_le();
30640        __struct.next_alt = buf.get_i32_le();
30641        __struct.vx = buf.get_i16_le();
30642        __struct.vy = buf.get_i16_le();
30643        __struct.vz = buf.get_i16_le();
30644        __struct.h_acc = buf.get_u16_le();
30645        __struct.v_acc = buf.get_u16_le();
30646        __struct.vel_acc = buf.get_u16_le();
30647        __struct.update_rate = buf.get_u16_le();
30648        for v in &mut __struct.uas_id {
30649            let val = buf.get_u8();
30650            *v = val;
30651        }
30652        let tmp = buf.get_u8();
30653        __struct.flight_state =
30654            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30655                enum_type: "UtmFlightState",
30656                value: tmp as u32,
30657            })?;
30658        let tmp = buf.get_u8();
30659        __struct.flags = UtmDataAvailFlags::from_bits(tmp & UtmDataAvailFlags::all().bits())
30660            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30661                flag_type: "UtmDataAvailFlags",
30662                value: tmp as u32,
30663            })?;
30664        Ok(__struct)
30665    }
30666    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30667        let mut __tmp = BytesMut::new(bytes);
30668        #[allow(clippy::absurd_extreme_comparisons)]
30669        #[allow(unused_comparisons)]
30670        if __tmp.remaining() < Self::ENCODED_LEN {
30671            panic!(
30672                "buffer is too small (need {} bytes, but got {})",
30673                Self::ENCODED_LEN,
30674                __tmp.remaining(),
30675            )
30676        }
30677        __tmp.put_u64_le(self.time);
30678        __tmp.put_i32_le(self.lat);
30679        __tmp.put_i32_le(self.lon);
30680        __tmp.put_i32_le(self.alt);
30681        __tmp.put_i32_le(self.relative_alt);
30682        __tmp.put_i32_le(self.next_lat);
30683        __tmp.put_i32_le(self.next_lon);
30684        __tmp.put_i32_le(self.next_alt);
30685        __tmp.put_i16_le(self.vx);
30686        __tmp.put_i16_le(self.vy);
30687        __tmp.put_i16_le(self.vz);
30688        __tmp.put_u16_le(self.h_acc);
30689        __tmp.put_u16_le(self.v_acc);
30690        __tmp.put_u16_le(self.vel_acc);
30691        __tmp.put_u16_le(self.update_rate);
30692        for val in &self.uas_id {
30693            __tmp.put_u8(*val);
30694        }
30695        __tmp.put_u8(self.flight_state as u8);
30696        __tmp.put_u8(self.flags.bits());
30697        if matches!(version, MavlinkVersion::V2) {
30698            let len = __tmp.len();
30699            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30700        } else {
30701            __tmp.len()
30702        }
30703    }
30704}
30705#[doc = "id: 248"]
30706#[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
30707#[derive(Debug, Clone, PartialEq)]
30708#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30709#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30710pub struct V2_EXTENSION_DATA {
30711    #[doc = "A code that identifies the software component that understands this message (analogous to USB device classes or mime type strings). If this code is less than 32768, it is considered a 'registered' protocol extension and the corresponding entry should be added to <https://github.com/mavlink/mavlink/definition_files/extension_message_ids.xml>. Software creators can register blocks of message IDs as needed (useful for GCS specific metadata, etc...). Message_types greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
30712    pub message_type: u16,
30713    #[doc = "Network ID (0 for broadcast)"]
30714    pub target_network: u8,
30715    #[doc = "System ID (0 for broadcast)"]
30716    pub target_system: u8,
30717    #[doc = "Component ID (0 for broadcast)"]
30718    pub target_component: u8,
30719    #[doc = "Variable length payload. The length must be encoded in the payload as part of the message_type protocol, e.g. by including the length as payload data, or by terminating the payload data with a non-zero marker. This is required in order to reconstruct zero-terminated payloads that are (or otherwise would be) trimmed by MAVLink 2 empty-byte truncation. The entire content of the payload block is opaque unless you understand the encoding message_type. The particular encoding used can be extension specific and might not always be documented as part of the MAVLink specification."]
30720    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30721    pub payload: [u8; 249],
30722}
30723impl V2_EXTENSION_DATA {
30724    pub const ENCODED_LEN: usize = 254usize;
30725    pub const DEFAULT: Self = Self {
30726        message_type: 0_u16,
30727        target_network: 0_u8,
30728        target_system: 0_u8,
30729        target_component: 0_u8,
30730        payload: [0_u8; 249usize],
30731    };
30732    #[cfg(feature = "arbitrary")]
30733    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30734        use arbitrary::{Arbitrary, Unstructured};
30735        let mut buf = [0u8; 1024];
30736        rng.fill_bytes(&mut buf);
30737        let mut unstructured = Unstructured::new(&buf);
30738        Self::arbitrary(&mut unstructured).unwrap_or_default()
30739    }
30740}
30741impl Default for V2_EXTENSION_DATA {
30742    fn default() -> Self {
30743        Self::DEFAULT.clone()
30744    }
30745}
30746impl MessageData for V2_EXTENSION_DATA {
30747    type Message = MavMessage;
30748    const ID: u32 = 248u32;
30749    const NAME: &'static str = "V2_EXTENSION";
30750    const EXTRA_CRC: u8 = 8u8;
30751    const ENCODED_LEN: usize = 254usize;
30752    fn deser(
30753        _version: MavlinkVersion,
30754        __input: &[u8],
30755    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30756        let avail_len = __input.len();
30757        let mut payload_buf = [0; Self::ENCODED_LEN];
30758        let mut buf = if avail_len < Self::ENCODED_LEN {
30759            payload_buf[0..avail_len].copy_from_slice(__input);
30760            Bytes::new(&payload_buf)
30761        } else {
30762            Bytes::new(__input)
30763        };
30764        let mut __struct = Self::default();
30765        __struct.message_type = buf.get_u16_le();
30766        __struct.target_network = buf.get_u8();
30767        __struct.target_system = buf.get_u8();
30768        __struct.target_component = buf.get_u8();
30769        for v in &mut __struct.payload {
30770            let val = buf.get_u8();
30771            *v = val;
30772        }
30773        Ok(__struct)
30774    }
30775    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30776        let mut __tmp = BytesMut::new(bytes);
30777        #[allow(clippy::absurd_extreme_comparisons)]
30778        #[allow(unused_comparisons)]
30779        if __tmp.remaining() < Self::ENCODED_LEN {
30780            panic!(
30781                "buffer is too small (need {} bytes, but got {})",
30782                Self::ENCODED_LEN,
30783                __tmp.remaining(),
30784            )
30785        }
30786        __tmp.put_u16_le(self.message_type);
30787        __tmp.put_u8(self.target_network);
30788        __tmp.put_u8(self.target_system);
30789        __tmp.put_u8(self.target_component);
30790        for val in &self.payload {
30791            __tmp.put_u8(*val);
30792        }
30793        if matches!(version, MavlinkVersion::V2) {
30794            let len = __tmp.len();
30795            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30796        } else {
30797            __tmp.len()
30798        }
30799    }
30800}
30801#[doc = "id: 74"]
30802#[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
30803#[derive(Debug, Clone, PartialEq)]
30804#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30805#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30806pub struct VFR_HUD_DATA {
30807    #[doc = "Vehicle speed in form appropriate for vehicle type. For standard aircraft this is typically calibrated airspeed (CAS) or indicated airspeed (IAS) - either of which can be used by a pilot to estimate stall speed."]
30808    pub airspeed: f32,
30809    #[doc = "Current ground speed."]
30810    pub groundspeed: f32,
30811    #[doc = "Current altitude (MSL)."]
30812    pub alt: f32,
30813    #[doc = "Current climb rate."]
30814    pub climb: f32,
30815    #[doc = "Current heading in compass units (0-360, 0=north)."]
30816    pub heading: i16,
30817    #[doc = "Current throttle setting (0 to 100)."]
30818    pub throttle: u16,
30819}
30820impl VFR_HUD_DATA {
30821    pub const ENCODED_LEN: usize = 20usize;
30822    pub const DEFAULT: Self = Self {
30823        airspeed: 0.0_f32,
30824        groundspeed: 0.0_f32,
30825        alt: 0.0_f32,
30826        climb: 0.0_f32,
30827        heading: 0_i16,
30828        throttle: 0_u16,
30829    };
30830    #[cfg(feature = "arbitrary")]
30831    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30832        use arbitrary::{Arbitrary, Unstructured};
30833        let mut buf = [0u8; 1024];
30834        rng.fill_bytes(&mut buf);
30835        let mut unstructured = Unstructured::new(&buf);
30836        Self::arbitrary(&mut unstructured).unwrap_or_default()
30837    }
30838}
30839impl Default for VFR_HUD_DATA {
30840    fn default() -> Self {
30841        Self::DEFAULT.clone()
30842    }
30843}
30844impl MessageData for VFR_HUD_DATA {
30845    type Message = MavMessage;
30846    const ID: u32 = 74u32;
30847    const NAME: &'static str = "VFR_HUD";
30848    const EXTRA_CRC: u8 = 20u8;
30849    const ENCODED_LEN: usize = 20usize;
30850    fn deser(
30851        _version: MavlinkVersion,
30852        __input: &[u8],
30853    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30854        let avail_len = __input.len();
30855        let mut payload_buf = [0; Self::ENCODED_LEN];
30856        let mut buf = if avail_len < Self::ENCODED_LEN {
30857            payload_buf[0..avail_len].copy_from_slice(__input);
30858            Bytes::new(&payload_buf)
30859        } else {
30860            Bytes::new(__input)
30861        };
30862        let mut __struct = Self::default();
30863        __struct.airspeed = buf.get_f32_le();
30864        __struct.groundspeed = buf.get_f32_le();
30865        __struct.alt = buf.get_f32_le();
30866        __struct.climb = buf.get_f32_le();
30867        __struct.heading = buf.get_i16_le();
30868        __struct.throttle = buf.get_u16_le();
30869        Ok(__struct)
30870    }
30871    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30872        let mut __tmp = BytesMut::new(bytes);
30873        #[allow(clippy::absurd_extreme_comparisons)]
30874        #[allow(unused_comparisons)]
30875        if __tmp.remaining() < Self::ENCODED_LEN {
30876            panic!(
30877                "buffer is too small (need {} bytes, but got {})",
30878                Self::ENCODED_LEN,
30879                __tmp.remaining(),
30880            )
30881        }
30882        __tmp.put_f32_le(self.airspeed);
30883        __tmp.put_f32_le(self.groundspeed);
30884        __tmp.put_f32_le(self.alt);
30885        __tmp.put_f32_le(self.climb);
30886        __tmp.put_i16_le(self.heading);
30887        __tmp.put_u16_le(self.throttle);
30888        if matches!(version, MavlinkVersion::V2) {
30889            let len = __tmp.len();
30890            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30891        } else {
30892            __tmp.len()
30893        }
30894    }
30895}
30896#[doc = "id: 241"]
30897#[doc = "Vibration levels and accelerometer clipping."]
30898#[derive(Debug, Clone, PartialEq)]
30899#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30900#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30901pub struct VIBRATION_DATA {
30902    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30903    pub time_usec: u64,
30904    #[doc = "Vibration levels on X-axis"]
30905    pub vibration_x: f32,
30906    #[doc = "Vibration levels on Y-axis"]
30907    pub vibration_y: f32,
30908    #[doc = "Vibration levels on Z-axis"]
30909    pub vibration_z: f32,
30910    #[doc = "first accelerometer clipping count"]
30911    pub clipping_0: u32,
30912    #[doc = "second accelerometer clipping count"]
30913    pub clipping_1: u32,
30914    #[doc = "third accelerometer clipping count"]
30915    pub clipping_2: u32,
30916}
30917impl VIBRATION_DATA {
30918    pub const ENCODED_LEN: usize = 32usize;
30919    pub const DEFAULT: Self = Self {
30920        time_usec: 0_u64,
30921        vibration_x: 0.0_f32,
30922        vibration_y: 0.0_f32,
30923        vibration_z: 0.0_f32,
30924        clipping_0: 0_u32,
30925        clipping_1: 0_u32,
30926        clipping_2: 0_u32,
30927    };
30928    #[cfg(feature = "arbitrary")]
30929    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30930        use arbitrary::{Arbitrary, Unstructured};
30931        let mut buf = [0u8; 1024];
30932        rng.fill_bytes(&mut buf);
30933        let mut unstructured = Unstructured::new(&buf);
30934        Self::arbitrary(&mut unstructured).unwrap_or_default()
30935    }
30936}
30937impl Default for VIBRATION_DATA {
30938    fn default() -> Self {
30939        Self::DEFAULT.clone()
30940    }
30941}
30942impl MessageData for VIBRATION_DATA {
30943    type Message = MavMessage;
30944    const ID: u32 = 241u32;
30945    const NAME: &'static str = "VIBRATION";
30946    const EXTRA_CRC: u8 = 90u8;
30947    const ENCODED_LEN: usize = 32usize;
30948    fn deser(
30949        _version: MavlinkVersion,
30950        __input: &[u8],
30951    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30952        let avail_len = __input.len();
30953        let mut payload_buf = [0; Self::ENCODED_LEN];
30954        let mut buf = if avail_len < Self::ENCODED_LEN {
30955            payload_buf[0..avail_len].copy_from_slice(__input);
30956            Bytes::new(&payload_buf)
30957        } else {
30958            Bytes::new(__input)
30959        };
30960        let mut __struct = Self::default();
30961        __struct.time_usec = buf.get_u64_le();
30962        __struct.vibration_x = buf.get_f32_le();
30963        __struct.vibration_y = buf.get_f32_le();
30964        __struct.vibration_z = buf.get_f32_le();
30965        __struct.clipping_0 = buf.get_u32_le();
30966        __struct.clipping_1 = buf.get_u32_le();
30967        __struct.clipping_2 = buf.get_u32_le();
30968        Ok(__struct)
30969    }
30970    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30971        let mut __tmp = BytesMut::new(bytes);
30972        #[allow(clippy::absurd_extreme_comparisons)]
30973        #[allow(unused_comparisons)]
30974        if __tmp.remaining() < Self::ENCODED_LEN {
30975            panic!(
30976                "buffer is too small (need {} bytes, but got {})",
30977                Self::ENCODED_LEN,
30978                __tmp.remaining(),
30979            )
30980        }
30981        __tmp.put_u64_le(self.time_usec);
30982        __tmp.put_f32_le(self.vibration_x);
30983        __tmp.put_f32_le(self.vibration_y);
30984        __tmp.put_f32_le(self.vibration_z);
30985        __tmp.put_u32_le(self.clipping_0);
30986        __tmp.put_u32_le(self.clipping_1);
30987        __tmp.put_u32_le(self.clipping_2);
30988        if matches!(version, MavlinkVersion::V2) {
30989            let len = __tmp.len();
30990            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30991        } else {
30992            __tmp.len()
30993        }
30994    }
30995}
30996#[doc = "id: 104"]
30997#[doc = "Global position estimate from a Vicon motion system source."]
30998#[derive(Debug, Clone, PartialEq)]
30999#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31000#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31001pub struct VICON_POSITION_ESTIMATE_DATA {
31002    #[doc = "Timestamp (UNIX time or time since system boot)"]
31003    pub usec: u64,
31004    #[doc = "Global X position"]
31005    pub x: f32,
31006    #[doc = "Global Y position"]
31007    pub y: f32,
31008    #[doc = "Global Z position"]
31009    pub z: f32,
31010    #[doc = "Roll angle"]
31011    pub roll: f32,
31012    #[doc = "Pitch angle"]
31013    pub pitch: f32,
31014    #[doc = "Yaw angle"]
31015    pub yaw: f32,
31016    #[doc = "Row-major representation of 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
31017    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31018    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31019    pub covariance: [f32; 21],
31020}
31021impl VICON_POSITION_ESTIMATE_DATA {
31022    pub const ENCODED_LEN: usize = 116usize;
31023    pub const DEFAULT: Self = Self {
31024        usec: 0_u64,
31025        x: 0.0_f32,
31026        y: 0.0_f32,
31027        z: 0.0_f32,
31028        roll: 0.0_f32,
31029        pitch: 0.0_f32,
31030        yaw: 0.0_f32,
31031        covariance: [0.0_f32; 21usize],
31032    };
31033    #[cfg(feature = "arbitrary")]
31034    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31035        use arbitrary::{Arbitrary, Unstructured};
31036        let mut buf = [0u8; 1024];
31037        rng.fill_bytes(&mut buf);
31038        let mut unstructured = Unstructured::new(&buf);
31039        Self::arbitrary(&mut unstructured).unwrap_or_default()
31040    }
31041}
31042impl Default for VICON_POSITION_ESTIMATE_DATA {
31043    fn default() -> Self {
31044        Self::DEFAULT.clone()
31045    }
31046}
31047impl MessageData for VICON_POSITION_ESTIMATE_DATA {
31048    type Message = MavMessage;
31049    const ID: u32 = 104u32;
31050    const NAME: &'static str = "VICON_POSITION_ESTIMATE";
31051    const EXTRA_CRC: u8 = 56u8;
31052    const ENCODED_LEN: usize = 116usize;
31053    fn deser(
31054        _version: MavlinkVersion,
31055        __input: &[u8],
31056    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31057        let avail_len = __input.len();
31058        let mut payload_buf = [0; Self::ENCODED_LEN];
31059        let mut buf = if avail_len < Self::ENCODED_LEN {
31060            payload_buf[0..avail_len].copy_from_slice(__input);
31061            Bytes::new(&payload_buf)
31062        } else {
31063            Bytes::new(__input)
31064        };
31065        let mut __struct = Self::default();
31066        __struct.usec = buf.get_u64_le();
31067        __struct.x = buf.get_f32_le();
31068        __struct.y = buf.get_f32_le();
31069        __struct.z = buf.get_f32_le();
31070        __struct.roll = buf.get_f32_le();
31071        __struct.pitch = buf.get_f32_le();
31072        __struct.yaw = buf.get_f32_le();
31073        for v in &mut __struct.covariance {
31074            let val = buf.get_f32_le();
31075            *v = val;
31076        }
31077        Ok(__struct)
31078    }
31079    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31080        let mut __tmp = BytesMut::new(bytes);
31081        #[allow(clippy::absurd_extreme_comparisons)]
31082        #[allow(unused_comparisons)]
31083        if __tmp.remaining() < Self::ENCODED_LEN {
31084            panic!(
31085                "buffer is too small (need {} bytes, but got {})",
31086                Self::ENCODED_LEN,
31087                __tmp.remaining(),
31088            )
31089        }
31090        __tmp.put_u64_le(self.usec);
31091        __tmp.put_f32_le(self.x);
31092        __tmp.put_f32_le(self.y);
31093        __tmp.put_f32_le(self.z);
31094        __tmp.put_f32_le(self.roll);
31095        __tmp.put_f32_le(self.pitch);
31096        __tmp.put_f32_le(self.yaw);
31097        for val in &self.covariance {
31098            __tmp.put_f32_le(*val);
31099        }
31100        if matches!(version, MavlinkVersion::V2) {
31101            let len = __tmp.len();
31102            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31103        } else {
31104            __tmp.len()
31105        }
31106    }
31107}
31108#[doc = "id: 269"]
31109#[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
31110#[derive(Debug, Clone, PartialEq)]
31111#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31112#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31113pub struct VIDEO_STREAM_INFORMATION_DATA {
31114    #[doc = "Frame rate."]
31115    pub framerate: f32,
31116    #[doc = "Bit rate."]
31117    pub bitrate: u32,
31118    #[doc = "Bitmap of stream status flags."]
31119    pub flags: VideoStreamStatusFlags,
31120    #[doc = "Horizontal resolution."]
31121    pub resolution_h: u16,
31122    #[doc = "Vertical resolution."]
31123    pub resolution_v: u16,
31124    #[doc = "Video image rotation clockwise."]
31125    pub rotation: u16,
31126    #[doc = "Horizontal Field of view."]
31127    pub hfov: u16,
31128    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
31129    pub stream_id: u8,
31130    #[doc = "Number of streams available."]
31131    pub count: u8,
31132    #[doc = "Type of stream."]
31133    pub mavtype: VideoStreamType,
31134    #[doc = "Stream name."]
31135    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31136    pub name: [u8; 32],
31137    #[doc = "Video stream URI (TCP or RTSP URI ground station should connect to) or port number (UDP port ground station should listen to)."]
31138    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31139    pub uri: [u8; 160],
31140    #[doc = "Encoding of stream."]
31141    #[cfg_attr(feature = "serde", serde(default))]
31142    pub encoding: VideoStreamEncoding,
31143    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
31144    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31145    pub camera_device_id: u8,
31146}
31147impl VIDEO_STREAM_INFORMATION_DATA {
31148    pub const ENCODED_LEN: usize = 215usize;
31149    pub const DEFAULT: Self = Self {
31150        framerate: 0.0_f32,
31151        bitrate: 0_u32,
31152        flags: VideoStreamStatusFlags::DEFAULT,
31153        resolution_h: 0_u16,
31154        resolution_v: 0_u16,
31155        rotation: 0_u16,
31156        hfov: 0_u16,
31157        stream_id: 0_u8,
31158        count: 0_u8,
31159        mavtype: VideoStreamType::DEFAULT,
31160        name: [0_u8; 32usize],
31161        uri: [0_u8; 160usize],
31162        encoding: VideoStreamEncoding::DEFAULT,
31163        camera_device_id: 0_u8,
31164    };
31165    #[cfg(feature = "arbitrary")]
31166    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31167        use arbitrary::{Arbitrary, Unstructured};
31168        let mut buf = [0u8; 1024];
31169        rng.fill_bytes(&mut buf);
31170        let mut unstructured = Unstructured::new(&buf);
31171        Self::arbitrary(&mut unstructured).unwrap_or_default()
31172    }
31173}
31174impl Default for VIDEO_STREAM_INFORMATION_DATA {
31175    fn default() -> Self {
31176        Self::DEFAULT.clone()
31177    }
31178}
31179impl MessageData for VIDEO_STREAM_INFORMATION_DATA {
31180    type Message = MavMessage;
31181    const ID: u32 = 269u32;
31182    const NAME: &'static str = "VIDEO_STREAM_INFORMATION";
31183    const EXTRA_CRC: u8 = 109u8;
31184    const ENCODED_LEN: usize = 215usize;
31185    fn deser(
31186        _version: MavlinkVersion,
31187        __input: &[u8],
31188    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31189        let avail_len = __input.len();
31190        let mut payload_buf = [0; Self::ENCODED_LEN];
31191        let mut buf = if avail_len < Self::ENCODED_LEN {
31192            payload_buf[0..avail_len].copy_from_slice(__input);
31193            Bytes::new(&payload_buf)
31194        } else {
31195            Bytes::new(__input)
31196        };
31197        let mut __struct = Self::default();
31198        __struct.framerate = buf.get_f32_le();
31199        __struct.bitrate = buf.get_u32_le();
31200        let tmp = buf.get_u16_le();
31201        __struct.flags = VideoStreamStatusFlags::from_bits(
31202            tmp & VideoStreamStatusFlags::all().bits(),
31203        )
31204        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31205            flag_type: "VideoStreamStatusFlags",
31206            value: tmp as u32,
31207        })?;
31208        __struct.resolution_h = buf.get_u16_le();
31209        __struct.resolution_v = buf.get_u16_le();
31210        __struct.rotation = buf.get_u16_le();
31211        __struct.hfov = buf.get_u16_le();
31212        __struct.stream_id = buf.get_u8();
31213        __struct.count = buf.get_u8();
31214        let tmp = buf.get_u8();
31215        __struct.mavtype =
31216            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31217                enum_type: "VideoStreamType",
31218                value: tmp as u32,
31219            })?;
31220        for v in &mut __struct.name {
31221            let val = buf.get_u8();
31222            *v = val;
31223        }
31224        for v in &mut __struct.uri {
31225            let val = buf.get_u8();
31226            *v = val;
31227        }
31228        let tmp = buf.get_u8();
31229        __struct.encoding =
31230            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31231                enum_type: "VideoStreamEncoding",
31232                value: tmp as u32,
31233            })?;
31234        __struct.camera_device_id = buf.get_u8();
31235        Ok(__struct)
31236    }
31237    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31238        let mut __tmp = BytesMut::new(bytes);
31239        #[allow(clippy::absurd_extreme_comparisons)]
31240        #[allow(unused_comparisons)]
31241        if __tmp.remaining() < Self::ENCODED_LEN {
31242            panic!(
31243                "buffer is too small (need {} bytes, but got {})",
31244                Self::ENCODED_LEN,
31245                __tmp.remaining(),
31246            )
31247        }
31248        __tmp.put_f32_le(self.framerate);
31249        __tmp.put_u32_le(self.bitrate);
31250        __tmp.put_u16_le(self.flags.bits());
31251        __tmp.put_u16_le(self.resolution_h);
31252        __tmp.put_u16_le(self.resolution_v);
31253        __tmp.put_u16_le(self.rotation);
31254        __tmp.put_u16_le(self.hfov);
31255        __tmp.put_u8(self.stream_id);
31256        __tmp.put_u8(self.count);
31257        __tmp.put_u8(self.mavtype as u8);
31258        for val in &self.name {
31259            __tmp.put_u8(*val);
31260        }
31261        for val in &self.uri {
31262            __tmp.put_u8(*val);
31263        }
31264        __tmp.put_u8(self.encoding as u8);
31265        __tmp.put_u8(self.camera_device_id);
31266        if matches!(version, MavlinkVersion::V2) {
31267            let len = __tmp.len();
31268            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31269        } else {
31270            __tmp.len()
31271        }
31272    }
31273}
31274#[doc = "id: 270"]
31275#[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
31276#[derive(Debug, Clone, PartialEq)]
31277#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31278#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31279pub struct VIDEO_STREAM_STATUS_DATA {
31280    #[doc = "Frame rate"]
31281    pub framerate: f32,
31282    #[doc = "Bit rate"]
31283    pub bitrate: u32,
31284    #[doc = "Bitmap of stream status flags"]
31285    pub flags: VideoStreamStatusFlags,
31286    #[doc = "Horizontal resolution"]
31287    pub resolution_h: u16,
31288    #[doc = "Vertical resolution"]
31289    pub resolution_v: u16,
31290    #[doc = "Video image rotation clockwise"]
31291    pub rotation: u16,
31292    #[doc = "Horizontal Field of view"]
31293    pub hfov: u16,
31294    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
31295    pub stream_id: u8,
31296    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
31297    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31298    pub camera_device_id: u8,
31299}
31300impl VIDEO_STREAM_STATUS_DATA {
31301    pub const ENCODED_LEN: usize = 20usize;
31302    pub const DEFAULT: Self = Self {
31303        framerate: 0.0_f32,
31304        bitrate: 0_u32,
31305        flags: VideoStreamStatusFlags::DEFAULT,
31306        resolution_h: 0_u16,
31307        resolution_v: 0_u16,
31308        rotation: 0_u16,
31309        hfov: 0_u16,
31310        stream_id: 0_u8,
31311        camera_device_id: 0_u8,
31312    };
31313    #[cfg(feature = "arbitrary")]
31314    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31315        use arbitrary::{Arbitrary, Unstructured};
31316        let mut buf = [0u8; 1024];
31317        rng.fill_bytes(&mut buf);
31318        let mut unstructured = Unstructured::new(&buf);
31319        Self::arbitrary(&mut unstructured).unwrap_or_default()
31320    }
31321}
31322impl Default for VIDEO_STREAM_STATUS_DATA {
31323    fn default() -> Self {
31324        Self::DEFAULT.clone()
31325    }
31326}
31327impl MessageData for VIDEO_STREAM_STATUS_DATA {
31328    type Message = MavMessage;
31329    const ID: u32 = 270u32;
31330    const NAME: &'static str = "VIDEO_STREAM_STATUS";
31331    const EXTRA_CRC: u8 = 59u8;
31332    const ENCODED_LEN: usize = 20usize;
31333    fn deser(
31334        _version: MavlinkVersion,
31335        __input: &[u8],
31336    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31337        let avail_len = __input.len();
31338        let mut payload_buf = [0; Self::ENCODED_LEN];
31339        let mut buf = if avail_len < Self::ENCODED_LEN {
31340            payload_buf[0..avail_len].copy_from_slice(__input);
31341            Bytes::new(&payload_buf)
31342        } else {
31343            Bytes::new(__input)
31344        };
31345        let mut __struct = Self::default();
31346        __struct.framerate = buf.get_f32_le();
31347        __struct.bitrate = buf.get_u32_le();
31348        let tmp = buf.get_u16_le();
31349        __struct.flags = VideoStreamStatusFlags::from_bits(
31350            tmp & VideoStreamStatusFlags::all().bits(),
31351        )
31352        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31353            flag_type: "VideoStreamStatusFlags",
31354            value: tmp as u32,
31355        })?;
31356        __struct.resolution_h = buf.get_u16_le();
31357        __struct.resolution_v = buf.get_u16_le();
31358        __struct.rotation = buf.get_u16_le();
31359        __struct.hfov = buf.get_u16_le();
31360        __struct.stream_id = buf.get_u8();
31361        __struct.camera_device_id = buf.get_u8();
31362        Ok(__struct)
31363    }
31364    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31365        let mut __tmp = BytesMut::new(bytes);
31366        #[allow(clippy::absurd_extreme_comparisons)]
31367        #[allow(unused_comparisons)]
31368        if __tmp.remaining() < Self::ENCODED_LEN {
31369            panic!(
31370                "buffer is too small (need {} bytes, but got {})",
31371                Self::ENCODED_LEN,
31372                __tmp.remaining(),
31373            )
31374        }
31375        __tmp.put_f32_le(self.framerate);
31376        __tmp.put_u32_le(self.bitrate);
31377        __tmp.put_u16_le(self.flags.bits());
31378        __tmp.put_u16_le(self.resolution_h);
31379        __tmp.put_u16_le(self.resolution_v);
31380        __tmp.put_u16_le(self.rotation);
31381        __tmp.put_u16_le(self.hfov);
31382        __tmp.put_u8(self.stream_id);
31383        __tmp.put_u8(self.camera_device_id);
31384        if matches!(version, MavlinkVersion::V2) {
31385            let len = __tmp.len();
31386            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31387        } else {
31388            __tmp.len()
31389        }
31390    }
31391}
31392#[doc = "id: 102"]
31393#[doc = "Local position/attitude estimate from a vision source."]
31394#[derive(Debug, Clone, PartialEq)]
31395#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31396#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31397pub struct VISION_POSITION_ESTIMATE_DATA {
31398    #[doc = "Timestamp (UNIX time or time since system boot)"]
31399    pub usec: u64,
31400    #[doc = "Local X position"]
31401    pub x: f32,
31402    #[doc = "Local Y position"]
31403    pub y: f32,
31404    #[doc = "Local Z position"]
31405    pub z: f32,
31406    #[doc = "Roll angle"]
31407    pub roll: f32,
31408    #[doc = "Pitch angle"]
31409    pub pitch: f32,
31410    #[doc = "Yaw angle"]
31411    pub yaw: f32,
31412    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
31413    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31414    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31415    pub covariance: [f32; 21],
31416    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
31417    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31418    pub reset_counter: u8,
31419}
31420impl VISION_POSITION_ESTIMATE_DATA {
31421    pub const ENCODED_LEN: usize = 117usize;
31422    pub const DEFAULT: Self = Self {
31423        usec: 0_u64,
31424        x: 0.0_f32,
31425        y: 0.0_f32,
31426        z: 0.0_f32,
31427        roll: 0.0_f32,
31428        pitch: 0.0_f32,
31429        yaw: 0.0_f32,
31430        covariance: [0.0_f32; 21usize],
31431        reset_counter: 0_u8,
31432    };
31433    #[cfg(feature = "arbitrary")]
31434    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31435        use arbitrary::{Arbitrary, Unstructured};
31436        let mut buf = [0u8; 1024];
31437        rng.fill_bytes(&mut buf);
31438        let mut unstructured = Unstructured::new(&buf);
31439        Self::arbitrary(&mut unstructured).unwrap_or_default()
31440    }
31441}
31442impl Default for VISION_POSITION_ESTIMATE_DATA {
31443    fn default() -> Self {
31444        Self::DEFAULT.clone()
31445    }
31446}
31447impl MessageData for VISION_POSITION_ESTIMATE_DATA {
31448    type Message = MavMessage;
31449    const ID: u32 = 102u32;
31450    const NAME: &'static str = "VISION_POSITION_ESTIMATE";
31451    const EXTRA_CRC: u8 = 158u8;
31452    const ENCODED_LEN: usize = 117usize;
31453    fn deser(
31454        _version: MavlinkVersion,
31455        __input: &[u8],
31456    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31457        let avail_len = __input.len();
31458        let mut payload_buf = [0; Self::ENCODED_LEN];
31459        let mut buf = if avail_len < Self::ENCODED_LEN {
31460            payload_buf[0..avail_len].copy_from_slice(__input);
31461            Bytes::new(&payload_buf)
31462        } else {
31463            Bytes::new(__input)
31464        };
31465        let mut __struct = Self::default();
31466        __struct.usec = buf.get_u64_le();
31467        __struct.x = buf.get_f32_le();
31468        __struct.y = buf.get_f32_le();
31469        __struct.z = buf.get_f32_le();
31470        __struct.roll = buf.get_f32_le();
31471        __struct.pitch = buf.get_f32_le();
31472        __struct.yaw = buf.get_f32_le();
31473        for v in &mut __struct.covariance {
31474            let val = buf.get_f32_le();
31475            *v = val;
31476        }
31477        __struct.reset_counter = buf.get_u8();
31478        Ok(__struct)
31479    }
31480    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31481        let mut __tmp = BytesMut::new(bytes);
31482        #[allow(clippy::absurd_extreme_comparisons)]
31483        #[allow(unused_comparisons)]
31484        if __tmp.remaining() < Self::ENCODED_LEN {
31485            panic!(
31486                "buffer is too small (need {} bytes, but got {})",
31487                Self::ENCODED_LEN,
31488                __tmp.remaining(),
31489            )
31490        }
31491        __tmp.put_u64_le(self.usec);
31492        __tmp.put_f32_le(self.x);
31493        __tmp.put_f32_le(self.y);
31494        __tmp.put_f32_le(self.z);
31495        __tmp.put_f32_le(self.roll);
31496        __tmp.put_f32_le(self.pitch);
31497        __tmp.put_f32_le(self.yaw);
31498        for val in &self.covariance {
31499            __tmp.put_f32_le(*val);
31500        }
31501        __tmp.put_u8(self.reset_counter);
31502        if matches!(version, MavlinkVersion::V2) {
31503            let len = __tmp.len();
31504            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31505        } else {
31506            __tmp.len()
31507        }
31508    }
31509}
31510#[doc = "id: 103"]
31511#[doc = "Speed estimate from a vision source."]
31512#[derive(Debug, Clone, PartialEq)]
31513#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31514#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31515pub struct VISION_SPEED_ESTIMATE_DATA {
31516    #[doc = "Timestamp (UNIX time or time since system boot)"]
31517    pub usec: u64,
31518    #[doc = "Global X speed"]
31519    pub x: f32,
31520    #[doc = "Global Y speed"]
31521    pub y: f32,
31522    #[doc = "Global Z speed"]
31523    pub z: f32,
31524    #[doc = "Row-major representation of 3x3 linear velocity covariance matrix (states: vx, vy, vz; 1st three entries - 1st row, etc.). If unknown, assign NaN value to first element in the array."]
31525    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31526    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31527    pub covariance: [f32; 9],
31528    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
31529    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31530    pub reset_counter: u8,
31531}
31532impl VISION_SPEED_ESTIMATE_DATA {
31533    pub const ENCODED_LEN: usize = 57usize;
31534    pub const DEFAULT: Self = Self {
31535        usec: 0_u64,
31536        x: 0.0_f32,
31537        y: 0.0_f32,
31538        z: 0.0_f32,
31539        covariance: [0.0_f32; 9usize],
31540        reset_counter: 0_u8,
31541    };
31542    #[cfg(feature = "arbitrary")]
31543    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31544        use arbitrary::{Arbitrary, Unstructured};
31545        let mut buf = [0u8; 1024];
31546        rng.fill_bytes(&mut buf);
31547        let mut unstructured = Unstructured::new(&buf);
31548        Self::arbitrary(&mut unstructured).unwrap_or_default()
31549    }
31550}
31551impl Default for VISION_SPEED_ESTIMATE_DATA {
31552    fn default() -> Self {
31553        Self::DEFAULT.clone()
31554    }
31555}
31556impl MessageData for VISION_SPEED_ESTIMATE_DATA {
31557    type Message = MavMessage;
31558    const ID: u32 = 103u32;
31559    const NAME: &'static str = "VISION_SPEED_ESTIMATE";
31560    const EXTRA_CRC: u8 = 208u8;
31561    const ENCODED_LEN: usize = 57usize;
31562    fn deser(
31563        _version: MavlinkVersion,
31564        __input: &[u8],
31565    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31566        let avail_len = __input.len();
31567        let mut payload_buf = [0; Self::ENCODED_LEN];
31568        let mut buf = if avail_len < Self::ENCODED_LEN {
31569            payload_buf[0..avail_len].copy_from_slice(__input);
31570            Bytes::new(&payload_buf)
31571        } else {
31572            Bytes::new(__input)
31573        };
31574        let mut __struct = Self::default();
31575        __struct.usec = buf.get_u64_le();
31576        __struct.x = buf.get_f32_le();
31577        __struct.y = buf.get_f32_le();
31578        __struct.z = buf.get_f32_le();
31579        for v in &mut __struct.covariance {
31580            let val = buf.get_f32_le();
31581            *v = val;
31582        }
31583        __struct.reset_counter = buf.get_u8();
31584        Ok(__struct)
31585    }
31586    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31587        let mut __tmp = BytesMut::new(bytes);
31588        #[allow(clippy::absurd_extreme_comparisons)]
31589        #[allow(unused_comparisons)]
31590        if __tmp.remaining() < Self::ENCODED_LEN {
31591            panic!(
31592                "buffer is too small (need {} bytes, but got {})",
31593                Self::ENCODED_LEN,
31594                __tmp.remaining(),
31595            )
31596        }
31597        __tmp.put_u64_le(self.usec);
31598        __tmp.put_f32_le(self.x);
31599        __tmp.put_f32_le(self.y);
31600        __tmp.put_f32_le(self.z);
31601        for val in &self.covariance {
31602            __tmp.put_f32_le(*val);
31603        }
31604        __tmp.put_u8(self.reset_counter);
31605        if matches!(version, MavlinkVersion::V2) {
31606            let len = __tmp.len();
31607            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31608        } else {
31609            __tmp.len()
31610        }
31611    }
31612}
31613#[doc = "id: 9000"]
31614#[doc = "Cumulative distance traveled for each reported wheel."]
31615#[derive(Debug, Clone, PartialEq)]
31616#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31617#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31618pub struct WHEEL_DISTANCE_DATA {
31619    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
31620    pub time_usec: u64,
31621    #[doc = "Distance reported by individual wheel encoders. Forward rotations increase values, reverse rotations decrease them. Not all wheels will necessarily have wheel encoders; the mapping of encoders to wheel positions must be agreed/understood by the endpoints."]
31622    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31623    pub distance: [f64; 16],
31624    #[doc = "Number of wheels reported."]
31625    pub count: u8,
31626}
31627impl WHEEL_DISTANCE_DATA {
31628    pub const ENCODED_LEN: usize = 137usize;
31629    pub const DEFAULT: Self = Self {
31630        time_usec: 0_u64,
31631        distance: [0.0_f64; 16usize],
31632        count: 0_u8,
31633    };
31634    #[cfg(feature = "arbitrary")]
31635    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31636        use arbitrary::{Arbitrary, Unstructured};
31637        let mut buf = [0u8; 1024];
31638        rng.fill_bytes(&mut buf);
31639        let mut unstructured = Unstructured::new(&buf);
31640        Self::arbitrary(&mut unstructured).unwrap_or_default()
31641    }
31642}
31643impl Default for WHEEL_DISTANCE_DATA {
31644    fn default() -> Self {
31645        Self::DEFAULT.clone()
31646    }
31647}
31648impl MessageData for WHEEL_DISTANCE_DATA {
31649    type Message = MavMessage;
31650    const ID: u32 = 9000u32;
31651    const NAME: &'static str = "WHEEL_DISTANCE";
31652    const EXTRA_CRC: u8 = 113u8;
31653    const ENCODED_LEN: usize = 137usize;
31654    fn deser(
31655        _version: MavlinkVersion,
31656        __input: &[u8],
31657    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31658        let avail_len = __input.len();
31659        let mut payload_buf = [0; Self::ENCODED_LEN];
31660        let mut buf = if avail_len < Self::ENCODED_LEN {
31661            payload_buf[0..avail_len].copy_from_slice(__input);
31662            Bytes::new(&payload_buf)
31663        } else {
31664            Bytes::new(__input)
31665        };
31666        let mut __struct = Self::default();
31667        __struct.time_usec = buf.get_u64_le();
31668        for v in &mut __struct.distance {
31669            let val = buf.get_f64_le();
31670            *v = val;
31671        }
31672        __struct.count = buf.get_u8();
31673        Ok(__struct)
31674    }
31675    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31676        let mut __tmp = BytesMut::new(bytes);
31677        #[allow(clippy::absurd_extreme_comparisons)]
31678        #[allow(unused_comparisons)]
31679        if __tmp.remaining() < Self::ENCODED_LEN {
31680            panic!(
31681                "buffer is too small (need {} bytes, but got {})",
31682                Self::ENCODED_LEN,
31683                __tmp.remaining(),
31684            )
31685        }
31686        __tmp.put_u64_le(self.time_usec);
31687        for val in &self.distance {
31688            __tmp.put_f64_le(*val);
31689        }
31690        __tmp.put_u8(self.count);
31691        if matches!(version, MavlinkVersion::V2) {
31692            let len = __tmp.len();
31693            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31694        } else {
31695            __tmp.len()
31696        }
31697    }
31698}
31699#[doc = "id: 299"]
31700#[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
31701#[derive(Debug, Clone, PartialEq)]
31702#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31703#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31704pub struct WIFI_CONFIG_AP_DATA {
31705    #[doc = "Name of Wi-Fi network (SSID). Blank to leave it unchanged when setting. Current SSID when sent back as a response."]
31706    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31707    pub ssid: [u8; 32],
31708    #[doc = "Password. Blank for an open AP. MD5 hash when message is sent back as a response."]
31709    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31710    pub password: [u8; 64],
31711    #[doc = "WiFi Mode."]
31712    #[cfg_attr(feature = "serde", serde(default))]
31713    pub mode: WifiConfigApMode,
31714    #[doc = "Message acceptance response (sent back to GS)."]
31715    #[cfg_attr(feature = "serde", serde(default))]
31716    pub response: WifiConfigApResponse,
31717}
31718impl WIFI_CONFIG_AP_DATA {
31719    pub const ENCODED_LEN: usize = 98usize;
31720    pub const DEFAULT: Self = Self {
31721        ssid: [0_u8; 32usize],
31722        password: [0_u8; 64usize],
31723        mode: WifiConfigApMode::DEFAULT,
31724        response: WifiConfigApResponse::DEFAULT,
31725    };
31726    #[cfg(feature = "arbitrary")]
31727    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31728        use arbitrary::{Arbitrary, Unstructured};
31729        let mut buf = [0u8; 1024];
31730        rng.fill_bytes(&mut buf);
31731        let mut unstructured = Unstructured::new(&buf);
31732        Self::arbitrary(&mut unstructured).unwrap_or_default()
31733    }
31734}
31735impl Default for WIFI_CONFIG_AP_DATA {
31736    fn default() -> Self {
31737        Self::DEFAULT.clone()
31738    }
31739}
31740impl MessageData for WIFI_CONFIG_AP_DATA {
31741    type Message = MavMessage;
31742    const ID: u32 = 299u32;
31743    const NAME: &'static str = "WIFI_CONFIG_AP";
31744    const EXTRA_CRC: u8 = 19u8;
31745    const ENCODED_LEN: usize = 98usize;
31746    fn deser(
31747        _version: MavlinkVersion,
31748        __input: &[u8],
31749    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31750        let avail_len = __input.len();
31751        let mut payload_buf = [0; Self::ENCODED_LEN];
31752        let mut buf = if avail_len < Self::ENCODED_LEN {
31753            payload_buf[0..avail_len].copy_from_slice(__input);
31754            Bytes::new(&payload_buf)
31755        } else {
31756            Bytes::new(__input)
31757        };
31758        let mut __struct = Self::default();
31759        for v in &mut __struct.ssid {
31760            let val = buf.get_u8();
31761            *v = val;
31762        }
31763        for v in &mut __struct.password {
31764            let val = buf.get_u8();
31765            *v = val;
31766        }
31767        let tmp = buf.get_i8();
31768        __struct.mode =
31769            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31770                enum_type: "WifiConfigApMode",
31771                value: tmp as u32,
31772            })?;
31773        let tmp = buf.get_i8();
31774        __struct.response =
31775            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31776                enum_type: "WifiConfigApResponse",
31777                value: tmp as u32,
31778            })?;
31779        Ok(__struct)
31780    }
31781    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31782        let mut __tmp = BytesMut::new(bytes);
31783        #[allow(clippy::absurd_extreme_comparisons)]
31784        #[allow(unused_comparisons)]
31785        if __tmp.remaining() < Self::ENCODED_LEN {
31786            panic!(
31787                "buffer is too small (need {} bytes, but got {})",
31788                Self::ENCODED_LEN,
31789                __tmp.remaining(),
31790            )
31791        }
31792        for val in &self.ssid {
31793            __tmp.put_u8(*val);
31794        }
31795        for val in &self.password {
31796            __tmp.put_u8(*val);
31797        }
31798        __tmp.put_i8(self.mode as i8);
31799        __tmp.put_i8(self.response as i8);
31800        if matches!(version, MavlinkVersion::V2) {
31801            let len = __tmp.len();
31802            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31803        } else {
31804            __tmp.len()
31805        }
31806    }
31807}
31808#[doc = "id: 9005"]
31809#[doc = "Winch status."]
31810#[derive(Debug, Clone, PartialEq)]
31811#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31812#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31813pub struct WINCH_STATUS_DATA {
31814    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
31815    pub time_usec: u64,
31816    #[doc = "Length of line released. NaN if unknown"]
31817    pub line_length: f32,
31818    #[doc = "Speed line is being released or retracted. Positive values if being released, negative values if being retracted, NaN if unknown"]
31819    pub speed: f32,
31820    #[doc = "Tension on the line. NaN if unknown"]
31821    pub tension: f32,
31822    #[doc = "Voltage of the battery supplying the winch. NaN if unknown"]
31823    pub voltage: f32,
31824    #[doc = "Current draw from the winch. NaN if unknown"]
31825    pub current: f32,
31826    #[doc = "Status flags"]
31827    pub status: MavWinchStatusFlag,
31828    #[doc = "Temperature of the motor. INT16_MAX if unknown"]
31829    pub temperature: i16,
31830}
31831impl WINCH_STATUS_DATA {
31832    pub const ENCODED_LEN: usize = 34usize;
31833    pub const DEFAULT: Self = Self {
31834        time_usec: 0_u64,
31835        line_length: 0.0_f32,
31836        speed: 0.0_f32,
31837        tension: 0.0_f32,
31838        voltage: 0.0_f32,
31839        current: 0.0_f32,
31840        status: MavWinchStatusFlag::DEFAULT,
31841        temperature: 0_i16,
31842    };
31843    #[cfg(feature = "arbitrary")]
31844    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31845        use arbitrary::{Arbitrary, Unstructured};
31846        let mut buf = [0u8; 1024];
31847        rng.fill_bytes(&mut buf);
31848        let mut unstructured = Unstructured::new(&buf);
31849        Self::arbitrary(&mut unstructured).unwrap_or_default()
31850    }
31851}
31852impl Default for WINCH_STATUS_DATA {
31853    fn default() -> Self {
31854        Self::DEFAULT.clone()
31855    }
31856}
31857impl MessageData for WINCH_STATUS_DATA {
31858    type Message = MavMessage;
31859    const ID: u32 = 9005u32;
31860    const NAME: &'static str = "WINCH_STATUS";
31861    const EXTRA_CRC: u8 = 117u8;
31862    const ENCODED_LEN: usize = 34usize;
31863    fn deser(
31864        _version: MavlinkVersion,
31865        __input: &[u8],
31866    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31867        let avail_len = __input.len();
31868        let mut payload_buf = [0; Self::ENCODED_LEN];
31869        let mut buf = if avail_len < Self::ENCODED_LEN {
31870            payload_buf[0..avail_len].copy_from_slice(__input);
31871            Bytes::new(&payload_buf)
31872        } else {
31873            Bytes::new(__input)
31874        };
31875        let mut __struct = Self::default();
31876        __struct.time_usec = buf.get_u64_le();
31877        __struct.line_length = buf.get_f32_le();
31878        __struct.speed = buf.get_f32_le();
31879        __struct.tension = buf.get_f32_le();
31880        __struct.voltage = buf.get_f32_le();
31881        __struct.current = buf.get_f32_le();
31882        let tmp = buf.get_u32_le();
31883        __struct.status = MavWinchStatusFlag::from_bits(tmp & MavWinchStatusFlag::all().bits())
31884            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31885                flag_type: "MavWinchStatusFlag",
31886                value: tmp as u32,
31887            })?;
31888        __struct.temperature = buf.get_i16_le();
31889        Ok(__struct)
31890    }
31891    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31892        let mut __tmp = BytesMut::new(bytes);
31893        #[allow(clippy::absurd_extreme_comparisons)]
31894        #[allow(unused_comparisons)]
31895        if __tmp.remaining() < Self::ENCODED_LEN {
31896            panic!(
31897                "buffer is too small (need {} bytes, but got {})",
31898                Self::ENCODED_LEN,
31899                __tmp.remaining(),
31900            )
31901        }
31902        __tmp.put_u64_le(self.time_usec);
31903        __tmp.put_f32_le(self.line_length);
31904        __tmp.put_f32_le(self.speed);
31905        __tmp.put_f32_le(self.tension);
31906        __tmp.put_f32_le(self.voltage);
31907        __tmp.put_f32_le(self.current);
31908        __tmp.put_u32_le(self.status.bits());
31909        __tmp.put_i16_le(self.temperature);
31910        if matches!(version, MavlinkVersion::V2) {
31911            let len = __tmp.len();
31912            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31913        } else {
31914            __tmp.len()
31915        }
31916    }
31917}
31918#[doc = "id: 231"]
31919#[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
31920#[derive(Debug, Clone, PartialEq)]
31921#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31922#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31923pub struct WIND_COV_DATA {
31924    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
31925    pub time_usec: u64,
31926    #[doc = "Wind in North (NED) direction (NAN if unknown)"]
31927    pub wind_x: f32,
31928    #[doc = "Wind in East (NED) direction (NAN if unknown)"]
31929    pub wind_y: f32,
31930    #[doc = "Wind in down (NED) direction (NAN if unknown)"]
31931    pub wind_z: f32,
31932    #[doc = "Variability of wind in XY, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
31933    pub var_horiz: f32,
31934    #[doc = "Variability of wind in Z, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
31935    pub var_vert: f32,
31936    #[doc = "Altitude (MSL) that this measurement was taken at (NAN if unknown)"]
31937    pub wind_alt: f32,
31938    #[doc = "Horizontal speed 1-STD accuracy (0 if unknown)"]
31939    pub horiz_accuracy: f32,
31940    #[doc = "Vertical speed 1-STD accuracy (0 if unknown)"]
31941    pub vert_accuracy: f32,
31942}
31943impl WIND_COV_DATA {
31944    pub const ENCODED_LEN: usize = 40usize;
31945    pub const DEFAULT: Self = Self {
31946        time_usec: 0_u64,
31947        wind_x: 0.0_f32,
31948        wind_y: 0.0_f32,
31949        wind_z: 0.0_f32,
31950        var_horiz: 0.0_f32,
31951        var_vert: 0.0_f32,
31952        wind_alt: 0.0_f32,
31953        horiz_accuracy: 0.0_f32,
31954        vert_accuracy: 0.0_f32,
31955    };
31956    #[cfg(feature = "arbitrary")]
31957    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31958        use arbitrary::{Arbitrary, Unstructured};
31959        let mut buf = [0u8; 1024];
31960        rng.fill_bytes(&mut buf);
31961        let mut unstructured = Unstructured::new(&buf);
31962        Self::arbitrary(&mut unstructured).unwrap_or_default()
31963    }
31964}
31965impl Default for WIND_COV_DATA {
31966    fn default() -> Self {
31967        Self::DEFAULT.clone()
31968    }
31969}
31970impl MessageData for WIND_COV_DATA {
31971    type Message = MavMessage;
31972    const ID: u32 = 231u32;
31973    const NAME: &'static str = "WIND_COV";
31974    const EXTRA_CRC: u8 = 105u8;
31975    const ENCODED_LEN: usize = 40usize;
31976    fn deser(
31977        _version: MavlinkVersion,
31978        __input: &[u8],
31979    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31980        let avail_len = __input.len();
31981        let mut payload_buf = [0; Self::ENCODED_LEN];
31982        let mut buf = if avail_len < Self::ENCODED_LEN {
31983            payload_buf[0..avail_len].copy_from_slice(__input);
31984            Bytes::new(&payload_buf)
31985        } else {
31986            Bytes::new(__input)
31987        };
31988        let mut __struct = Self::default();
31989        __struct.time_usec = buf.get_u64_le();
31990        __struct.wind_x = buf.get_f32_le();
31991        __struct.wind_y = buf.get_f32_le();
31992        __struct.wind_z = buf.get_f32_le();
31993        __struct.var_horiz = buf.get_f32_le();
31994        __struct.var_vert = buf.get_f32_le();
31995        __struct.wind_alt = buf.get_f32_le();
31996        __struct.horiz_accuracy = buf.get_f32_le();
31997        __struct.vert_accuracy = buf.get_f32_le();
31998        Ok(__struct)
31999    }
32000    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32001        let mut __tmp = BytesMut::new(bytes);
32002        #[allow(clippy::absurd_extreme_comparisons)]
32003        #[allow(unused_comparisons)]
32004        if __tmp.remaining() < Self::ENCODED_LEN {
32005            panic!(
32006                "buffer is too small (need {} bytes, but got {})",
32007                Self::ENCODED_LEN,
32008                __tmp.remaining(),
32009            )
32010        }
32011        __tmp.put_u64_le(self.time_usec);
32012        __tmp.put_f32_le(self.wind_x);
32013        __tmp.put_f32_le(self.wind_y);
32014        __tmp.put_f32_le(self.wind_z);
32015        __tmp.put_f32_le(self.var_horiz);
32016        __tmp.put_f32_le(self.var_vert);
32017        __tmp.put_f32_le(self.wind_alt);
32018        __tmp.put_f32_le(self.horiz_accuracy);
32019        __tmp.put_f32_le(self.vert_accuracy);
32020        if matches!(version, MavlinkVersion::V2) {
32021            let len = __tmp.len();
32022            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32023        } else {
32024            __tmp.len()
32025        }
32026    }
32027}
32028#[derive(Clone, PartialEq, Debug)]
32029#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32030#[cfg_attr(feature = "serde", serde(tag = "type"))]
32031#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32032#[repr(u32)]
32033pub enum MavMessage {
32034    ACTUATOR_CONTROL_TARGET(ACTUATOR_CONTROL_TARGET_DATA),
32035    ACTUATOR_OUTPUT_STATUS(ACTUATOR_OUTPUT_STATUS_DATA),
32036    ADSB_VEHICLE(ADSB_VEHICLE_DATA),
32037    AIS_VESSEL(AIS_VESSEL_DATA),
32038    ALTITUDE(ALTITUDE_DATA),
32039    ATTITUDE(ATTITUDE_DATA),
32040    ATTITUDE_QUATERNION(ATTITUDE_QUATERNION_DATA),
32041    ATTITUDE_QUATERNION_COV(ATTITUDE_QUATERNION_COV_DATA),
32042    ATTITUDE_TARGET(ATTITUDE_TARGET_DATA),
32043    ATT_POS_MOCAP(ATT_POS_MOCAP_DATA),
32044    AUTH_KEY(AUTH_KEY_DATA),
32045    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA),
32046    AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA),
32047    AVAILABLE_MODES(AVAILABLE_MODES_DATA),
32048    AVAILABLE_MODES_MONITOR(AVAILABLE_MODES_MONITOR_DATA),
32049    BATTERY_INFO(BATTERY_INFO_DATA),
32050    BATTERY_STATUS(BATTERY_STATUS_DATA),
32051    BUTTON_CHANGE(BUTTON_CHANGE_DATA),
32052    CAMERA_CAPTURE_STATUS(CAMERA_CAPTURE_STATUS_DATA),
32053    CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA),
32054    CAMERA_IMAGE_CAPTURED(CAMERA_IMAGE_CAPTURED_DATA),
32055    CAMERA_INFORMATION(CAMERA_INFORMATION_DATA),
32056    CAMERA_SETTINGS(CAMERA_SETTINGS_DATA),
32057    CAMERA_THERMAL_RANGE(CAMERA_THERMAL_RANGE_DATA),
32058    CAMERA_TRACKING_GEO_STATUS(CAMERA_TRACKING_GEO_STATUS_DATA),
32059    CAMERA_TRACKING_IMAGE_STATUS(CAMERA_TRACKING_IMAGE_STATUS_DATA),
32060    CAMERA_TRIGGER(CAMERA_TRIGGER_DATA),
32061    CANFD_FRAME(CANFD_FRAME_DATA),
32062    CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA),
32063    CAN_FRAME(CAN_FRAME_DATA),
32064    CELLULAR_CONFIG(CELLULAR_CONFIG_DATA),
32065    CELLULAR_STATUS(CELLULAR_STATUS_DATA),
32066    CHANGE_OPERATOR_CONTROL(CHANGE_OPERATOR_CONTROL_DATA),
32067    CHANGE_OPERATOR_CONTROL_ACK(CHANGE_OPERATOR_CONTROL_ACK_DATA),
32068    COLLISION(COLLISION_DATA),
32069    COMMAND_ACK(COMMAND_ACK_DATA),
32070    COMMAND_CANCEL(COMMAND_CANCEL_DATA),
32071    COMMAND_INT(COMMAND_INT_DATA),
32072    COMMAND_LONG(COMMAND_LONG_DATA),
32073    #[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
32074    COMPONENT_INFORMATION(COMPONENT_INFORMATION_DATA),
32075    COMPONENT_INFORMATION_BASIC(COMPONENT_INFORMATION_BASIC_DATA),
32076    COMPONENT_METADATA(COMPONENT_METADATA_DATA),
32077    CONTROL_SYSTEM_STATE(CONTROL_SYSTEM_STATE_DATA),
32078    CURRENT_EVENT_SEQUENCE(CURRENT_EVENT_SEQUENCE_DATA),
32079    CURRENT_MODE(CURRENT_MODE_DATA),
32080    #[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
32081    DATA_STREAM(DATA_STREAM_DATA),
32082    DATA_TRANSMISSION_HANDSHAKE(DATA_TRANSMISSION_HANDSHAKE_DATA),
32083    DEBUG(DEBUG_DATA),
32084    DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA),
32085    DEBUG_VECT(DEBUG_VECT_DATA),
32086    DISTANCE_SENSOR(DISTANCE_SENSOR_DATA),
32087    EFI_STATUS(EFI_STATUS_DATA),
32088    ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA),
32089    ESC_INFO(ESC_INFO_DATA),
32090    ESC_STATUS(ESC_STATUS_DATA),
32091    ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA),
32092    EVENT(EVENT_DATA),
32093    EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA),
32094    FENCE_STATUS(FENCE_STATUS_DATA),
32095    FILE_TRANSFER_PROTOCOL(FILE_TRANSFER_PROTOCOL_DATA),
32096    FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA),
32097    FOLLOW_TARGET(FOLLOW_TARGET_DATA),
32098    FUEL_STATUS(FUEL_STATUS_DATA),
32099    GENERATOR_STATUS(GENERATOR_STATUS_DATA),
32100    GIMBAL_DEVICE_ATTITUDE_STATUS(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA),
32101    GIMBAL_DEVICE_INFORMATION(GIMBAL_DEVICE_INFORMATION_DATA),
32102    GIMBAL_DEVICE_SET_ATTITUDE(GIMBAL_DEVICE_SET_ATTITUDE_DATA),
32103    GIMBAL_MANAGER_INFORMATION(GIMBAL_MANAGER_INFORMATION_DATA),
32104    GIMBAL_MANAGER_SET_ATTITUDE(GIMBAL_MANAGER_SET_ATTITUDE_DATA),
32105    GIMBAL_MANAGER_SET_MANUAL_CONTROL(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA),
32106    GIMBAL_MANAGER_SET_PITCHYAW(GIMBAL_MANAGER_SET_PITCHYAW_DATA),
32107    GIMBAL_MANAGER_STATUS(GIMBAL_MANAGER_STATUS_DATA),
32108    GLOBAL_POSITION_INT(GLOBAL_POSITION_INT_DATA),
32109    GLOBAL_POSITION_INT_COV(GLOBAL_POSITION_INT_COV_DATA),
32110    GLOBAL_VISION_POSITION_ESTIMATE(GLOBAL_VISION_POSITION_ESTIMATE_DATA),
32111    GPS2_RAW(GPS2_RAW_DATA),
32112    GPS2_RTK(GPS2_RTK_DATA),
32113    GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA),
32114    #[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
32115    GPS_INJECT_DATA(GPS_INJECT_DATA_DATA),
32116    GPS_INPUT(GPS_INPUT_DATA),
32117    GPS_RAW_INT(GPS_RAW_INT_DATA),
32118    GPS_RTCM_DATA(GPS_RTCM_DATA_DATA),
32119    GPS_RTK(GPS_RTK_DATA),
32120    GPS_STATUS(GPS_STATUS_DATA),
32121    HEARTBEAT(HEARTBEAT_DATA),
32122    HIGHRES_IMU(HIGHRES_IMU_DATA),
32123    #[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
32124    HIGH_LATENCY(HIGH_LATENCY_DATA),
32125    HIGH_LATENCY2(HIGH_LATENCY2_DATA),
32126    HIL_ACTUATOR_CONTROLS(HIL_ACTUATOR_CONTROLS_DATA),
32127    HIL_CONTROLS(HIL_CONTROLS_DATA),
32128    HIL_GPS(HIL_GPS_DATA),
32129    HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA),
32130    HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA),
32131    HIL_SENSOR(HIL_SENSOR_DATA),
32132    #[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
32133    HIL_STATE(HIL_STATE_DATA),
32134    HIL_STATE_QUATERNION(HIL_STATE_QUATERNION_DATA),
32135    HOME_POSITION(HOME_POSITION_DATA),
32136    HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA),
32137    ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA),
32138    ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA),
32139    LANDING_TARGET(LANDING_TARGET_DATA),
32140    LINK_NODE_STATUS(LINK_NODE_STATUS_DATA),
32141    LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA),
32142    LOCAL_POSITION_NED_COV(LOCAL_POSITION_NED_COV_DATA),
32143    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA),
32144    LOGGING_ACK(LOGGING_ACK_DATA),
32145    LOGGING_DATA(LOGGING_DATA_DATA),
32146    LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA),
32147    LOG_DATA(LOG_DATA_DATA),
32148    LOG_ENTRY(LOG_ENTRY_DATA),
32149    LOG_ERASE(LOG_ERASE_DATA),
32150    LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA),
32151    LOG_REQUEST_END(LOG_REQUEST_END_DATA),
32152    LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA),
32153    MAG_CAL_REPORT(MAG_CAL_REPORT_DATA),
32154    MANUAL_CONTROL(MANUAL_CONTROL_DATA),
32155    MANUAL_SETPOINT(MANUAL_SETPOINT_DATA),
32156    MEMORY_VECT(MEMORY_VECT_DATA),
32157    MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA),
32158    MISSION_ACK(MISSION_ACK_DATA),
32159    MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA),
32160    MISSION_COUNT(MISSION_COUNT_DATA),
32161    MISSION_CURRENT(MISSION_CURRENT_DATA),
32162    #[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
32163    MISSION_ITEM(MISSION_ITEM_DATA),
32164    MISSION_ITEM_INT(MISSION_ITEM_INT_DATA),
32165    MISSION_ITEM_REACHED(MISSION_ITEM_REACHED_DATA),
32166    #[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
32167    MISSION_REQUEST(MISSION_REQUEST_DATA),
32168    MISSION_REQUEST_INT(MISSION_REQUEST_INT_DATA),
32169    MISSION_REQUEST_LIST(MISSION_REQUEST_LIST_DATA),
32170    MISSION_REQUEST_PARTIAL_LIST(MISSION_REQUEST_PARTIAL_LIST_DATA),
32171    #[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
32172    MISSION_SET_CURRENT(MISSION_SET_CURRENT_DATA),
32173    MISSION_WRITE_PARTIAL_LIST(MISSION_WRITE_PARTIAL_LIST_DATA),
32174    #[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
32175    MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA),
32176    NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA),
32177    NAMED_VALUE_INT(NAMED_VALUE_INT_DATA),
32178    NAV_CONTROLLER_OUTPUT(NAV_CONTROLLER_OUTPUT_DATA),
32179    OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA),
32180    ODOMETRY(ODOMETRY_DATA),
32181    ONBOARD_COMPUTER_STATUS(ONBOARD_COMPUTER_STATUS_DATA),
32182    OPEN_DRONE_ID_ARM_STATUS(OPEN_DRONE_ID_ARM_STATUS_DATA),
32183    OPEN_DRONE_ID_AUTHENTICATION(OPEN_DRONE_ID_AUTHENTICATION_DATA),
32184    OPEN_DRONE_ID_BASIC_ID(OPEN_DRONE_ID_BASIC_ID_DATA),
32185    OPEN_DRONE_ID_LOCATION(OPEN_DRONE_ID_LOCATION_DATA),
32186    OPEN_DRONE_ID_MESSAGE_PACK(OPEN_DRONE_ID_MESSAGE_PACK_DATA),
32187    OPEN_DRONE_ID_OPERATOR_ID(OPEN_DRONE_ID_OPERATOR_ID_DATA),
32188    OPEN_DRONE_ID_SELF_ID(OPEN_DRONE_ID_SELF_ID_DATA),
32189    OPEN_DRONE_ID_SYSTEM(OPEN_DRONE_ID_SYSTEM_DATA),
32190    OPEN_DRONE_ID_SYSTEM_UPDATE(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA),
32191    OPTICAL_FLOW(OPTICAL_FLOW_DATA),
32192    OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA),
32193    ORBIT_EXECUTION_STATUS(ORBIT_EXECUTION_STATUS_DATA),
32194    PARAM_EXT_ACK(PARAM_EXT_ACK_DATA),
32195    PARAM_EXT_REQUEST_LIST(PARAM_EXT_REQUEST_LIST_DATA),
32196    PARAM_EXT_REQUEST_READ(PARAM_EXT_REQUEST_READ_DATA),
32197    PARAM_EXT_SET(PARAM_EXT_SET_DATA),
32198    PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA),
32199    PARAM_MAP_RC(PARAM_MAP_RC_DATA),
32200    PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA),
32201    PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA),
32202    PARAM_SET(PARAM_SET_DATA),
32203    PARAM_VALUE(PARAM_VALUE_DATA),
32204    #[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
32205    PING(PING_DATA),
32206    #[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
32207    PLAY_TUNE(PLAY_TUNE_DATA),
32208    PLAY_TUNE_V2(PLAY_TUNE_V2_DATA),
32209    POSITION_TARGET_GLOBAL_INT(POSITION_TARGET_GLOBAL_INT_DATA),
32210    POSITION_TARGET_LOCAL_NED(POSITION_TARGET_LOCAL_NED_DATA),
32211    POWER_STATUS(POWER_STATUS_DATA),
32212    PROTOCOL_VERSION(PROTOCOL_VERSION_DATA),
32213    RADIO_STATUS(RADIO_STATUS_DATA),
32214    RAW_IMU(RAW_IMU_DATA),
32215    RAW_PRESSURE(RAW_PRESSURE_DATA),
32216    RAW_RPM(RAW_RPM_DATA),
32217    RC_CHANNELS(RC_CHANNELS_DATA),
32218    RC_CHANNELS_OVERRIDE(RC_CHANNELS_OVERRIDE_DATA),
32219    RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA),
32220    RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA),
32221    #[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
32222    REQUEST_DATA_STREAM(REQUEST_DATA_STREAM_DATA),
32223    REQUEST_EVENT(REQUEST_EVENT_DATA),
32224    RESOURCE_REQUEST(RESOURCE_REQUEST_DATA),
32225    RESPONSE_EVENT_ERROR(RESPONSE_EVENT_ERROR_DATA),
32226    SAFETY_ALLOWED_AREA(SAFETY_ALLOWED_AREA_DATA),
32227    SAFETY_SET_ALLOWED_AREA(SAFETY_SET_ALLOWED_AREA_DATA),
32228    SCALED_IMU(SCALED_IMU_DATA),
32229    SCALED_IMU2(SCALED_IMU2_DATA),
32230    SCALED_IMU3(SCALED_IMU3_DATA),
32231    SCALED_PRESSURE(SCALED_PRESSURE_DATA),
32232    SCALED_PRESSURE2(SCALED_PRESSURE2_DATA),
32233    SCALED_PRESSURE3(SCALED_PRESSURE3_DATA),
32234    SERIAL_CONTROL(SERIAL_CONTROL_DATA),
32235    SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA),
32236    SETUP_SIGNING(SETUP_SIGNING_DATA),
32237    SET_ACTUATOR_CONTROL_TARGET(SET_ACTUATOR_CONTROL_TARGET_DATA),
32238    SET_ATTITUDE_TARGET(SET_ATTITUDE_TARGET_DATA),
32239    #[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
32240    SET_GPS_GLOBAL_ORIGIN(SET_GPS_GLOBAL_ORIGIN_DATA),
32241    #[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
32242    SET_HOME_POSITION(SET_HOME_POSITION_DATA),
32243    #[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
32244    SET_MODE(SET_MODE_DATA),
32245    SET_POSITION_TARGET_GLOBAL_INT(SET_POSITION_TARGET_GLOBAL_INT_DATA),
32246    SET_POSITION_TARGET_LOCAL_NED(SET_POSITION_TARGET_LOCAL_NED_DATA),
32247    SIM_STATE(SIM_STATE_DATA),
32248    #[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
32249    SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA),
32250    STATUSTEXT(STATUSTEXT_DATA),
32251    STORAGE_INFORMATION(STORAGE_INFORMATION_DATA),
32252    SUPPORTED_TUNES(SUPPORTED_TUNES_DATA),
32253    SYSTEM_TIME(SYSTEM_TIME_DATA),
32254    SYS_STATUS(SYS_STATUS_DATA),
32255    TERRAIN_CHECK(TERRAIN_CHECK_DATA),
32256    TERRAIN_DATA(TERRAIN_DATA_DATA),
32257    TERRAIN_REPORT(TERRAIN_REPORT_DATA),
32258    TERRAIN_REQUEST(TERRAIN_REQUEST_DATA),
32259    TIMESYNC(TIMESYNC_DATA),
32260    TIME_ESTIMATE_TO_TARGET(TIME_ESTIMATE_TO_TARGET_DATA),
32261    TRAJECTORY_REPRESENTATION_BEZIER(TRAJECTORY_REPRESENTATION_BEZIER_DATA),
32262    TRAJECTORY_REPRESENTATION_WAYPOINTS(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA),
32263    TUNNEL(TUNNEL_DATA),
32264    UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA),
32265    UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA),
32266    UAVIONIX_ADSB_GET(UAVIONIX_ADSB_GET_DATA),
32267    UAVIONIX_ADSB_OUT_CFG(UAVIONIX_ADSB_OUT_CFG_DATA),
32268    UAVIONIX_ADSB_OUT_CFG_FLIGHTID(UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA),
32269    UAVIONIX_ADSB_OUT_CFG_REGISTRATION(UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA),
32270    UAVIONIX_ADSB_OUT_CONTROL(UAVIONIX_ADSB_OUT_CONTROL_DATA),
32271    UAVIONIX_ADSB_OUT_DYNAMIC(UAVIONIX_ADSB_OUT_DYNAMIC_DATA),
32272    UAVIONIX_ADSB_OUT_STATUS(UAVIONIX_ADSB_OUT_STATUS_DATA),
32273    UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT(UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA),
32274    UTM_GLOBAL_POSITION(UTM_GLOBAL_POSITION_DATA),
32275    V2_EXTENSION(V2_EXTENSION_DATA),
32276    VFR_HUD(VFR_HUD_DATA),
32277    VIBRATION(VIBRATION_DATA),
32278    VICON_POSITION_ESTIMATE(VICON_POSITION_ESTIMATE_DATA),
32279    VIDEO_STREAM_INFORMATION(VIDEO_STREAM_INFORMATION_DATA),
32280    VIDEO_STREAM_STATUS(VIDEO_STREAM_STATUS_DATA),
32281    VISION_POSITION_ESTIMATE(VISION_POSITION_ESTIMATE_DATA),
32282    VISION_SPEED_ESTIMATE(VISION_SPEED_ESTIMATE_DATA),
32283    WHEEL_DISTANCE(WHEEL_DISTANCE_DATA),
32284    WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA),
32285    WINCH_STATUS(WINCH_STATUS_DATA),
32286    WIND_COV(WIND_COV_DATA),
32287}
32288impl MavMessage {
32289    pub const fn all_ids() -> &'static [u32] {
32290        &[
32291            0u32, 1u32, 2u32, 4u32, 5u32, 6u32, 7u32, 8u32, 11u32, 20u32, 21u32, 22u32, 23u32,
32292            24u32, 25u32, 26u32, 27u32, 28u32, 29u32, 30u32, 31u32, 32u32, 33u32, 34u32, 35u32,
32293            36u32, 37u32, 38u32, 39u32, 40u32, 41u32, 42u32, 43u32, 44u32, 45u32, 46u32, 47u32,
32294            48u32, 49u32, 50u32, 51u32, 54u32, 55u32, 61u32, 62u32, 63u32, 64u32, 65u32, 66u32,
32295            67u32, 69u32, 70u32, 73u32, 74u32, 75u32, 76u32, 77u32, 80u32, 81u32, 82u32, 83u32,
32296            84u32, 85u32, 86u32, 87u32, 89u32, 90u32, 91u32, 92u32, 93u32, 100u32, 101u32, 102u32,
32297            103u32, 104u32, 105u32, 106u32, 107u32, 108u32, 109u32, 110u32, 111u32, 112u32, 113u32,
32298            114u32, 115u32, 116u32, 117u32, 118u32, 119u32, 120u32, 121u32, 122u32, 123u32, 124u32,
32299            125u32, 126u32, 127u32, 128u32, 129u32, 130u32, 131u32, 132u32, 133u32, 134u32, 135u32,
32300            136u32, 137u32, 138u32, 139u32, 140u32, 141u32, 142u32, 143u32, 144u32, 146u32, 147u32,
32301            148u32, 149u32, 162u32, 192u32, 225u32, 230u32, 231u32, 232u32, 233u32, 234u32, 235u32,
32302            241u32, 242u32, 243u32, 244u32, 245u32, 246u32, 247u32, 248u32, 249u32, 250u32, 251u32,
32303            252u32, 253u32, 254u32, 256u32, 257u32, 258u32, 259u32, 260u32, 261u32, 262u32, 263u32,
32304            264u32, 265u32, 266u32, 267u32, 268u32, 269u32, 270u32, 271u32, 275u32, 276u32, 277u32,
32305            280u32, 281u32, 282u32, 283u32, 284u32, 285u32, 286u32, 287u32, 288u32, 290u32, 291u32,
32306            299u32, 300u32, 301u32, 310u32, 311u32, 320u32, 321u32, 322u32, 323u32, 324u32, 330u32,
32307            331u32, 332u32, 333u32, 334u32, 335u32, 336u32, 339u32, 340u32, 350u32, 360u32, 370u32,
32308            371u32, 372u32, 373u32, 375u32, 380u32, 385u32, 386u32, 387u32, 388u32, 390u32, 395u32,
32309            396u32, 397u32, 400u32, 401u32, 410u32, 411u32, 412u32, 413u32, 435u32, 436u32, 437u32,
32310            440u32, 9000u32, 9005u32, 10001u32, 10002u32, 10003u32, 10004u32, 10005u32, 10006u32,
32311            10007u32, 10008u32, 12900u32, 12901u32, 12902u32, 12903u32, 12904u32, 12905u32,
32312            12915u32, 12918u32, 12919u32, 12920u32,
32313        ]
32314    }
32315}
32316impl Message for MavMessage {
32317    fn parse(
32318        version: MavlinkVersion,
32319        id: u32,
32320        payload: &[u8],
32321    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32322        match id {
32323            ACTUATOR_CONTROL_TARGET_DATA::ID => {
32324                ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
32325                    .map(Self::ACTUATOR_CONTROL_TARGET)
32326            }
32327            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::deser(version, payload)
32328                .map(Self::ACTUATOR_OUTPUT_STATUS),
32329            ADSB_VEHICLE_DATA::ID => {
32330                ADSB_VEHICLE_DATA::deser(version, payload).map(Self::ADSB_VEHICLE)
32331            }
32332            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::deser(version, payload).map(Self::AIS_VESSEL),
32333            ALTITUDE_DATA::ID => ALTITUDE_DATA::deser(version, payload).map(Self::ALTITUDE),
32334            ATTITUDE_DATA::ID => ATTITUDE_DATA::deser(version, payload).map(Self::ATTITUDE),
32335            ATTITUDE_QUATERNION_DATA::ID => {
32336                ATTITUDE_QUATERNION_DATA::deser(version, payload).map(Self::ATTITUDE_QUATERNION)
32337            }
32338            ATTITUDE_QUATERNION_COV_DATA::ID => {
32339                ATTITUDE_QUATERNION_COV_DATA::deser(version, payload)
32340                    .map(Self::ATTITUDE_QUATERNION_COV)
32341            }
32342            ATTITUDE_TARGET_DATA::ID => {
32343                ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::ATTITUDE_TARGET)
32344            }
32345            ATT_POS_MOCAP_DATA::ID => {
32346                ATT_POS_MOCAP_DATA::deser(version, payload).map(Self::ATT_POS_MOCAP)
32347            }
32348            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::deser(version, payload).map(Self::AUTH_KEY),
32349            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
32350                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::deser(version, payload)
32351                    .map(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE)
32352            }
32353            AUTOPILOT_VERSION_DATA::ID => {
32354                AUTOPILOT_VERSION_DATA::deser(version, payload).map(Self::AUTOPILOT_VERSION)
32355            }
32356            AVAILABLE_MODES_DATA::ID => {
32357                AVAILABLE_MODES_DATA::deser(version, payload).map(Self::AVAILABLE_MODES)
32358            }
32359            AVAILABLE_MODES_MONITOR_DATA::ID => {
32360                AVAILABLE_MODES_MONITOR_DATA::deser(version, payload)
32361                    .map(Self::AVAILABLE_MODES_MONITOR)
32362            }
32363            BATTERY_INFO_DATA::ID => {
32364                BATTERY_INFO_DATA::deser(version, payload).map(Self::BATTERY_INFO)
32365            }
32366            BATTERY_STATUS_DATA::ID => {
32367                BATTERY_STATUS_DATA::deser(version, payload).map(Self::BATTERY_STATUS)
32368            }
32369            BUTTON_CHANGE_DATA::ID => {
32370                BUTTON_CHANGE_DATA::deser(version, payload).map(Self::BUTTON_CHANGE)
32371            }
32372            CAMERA_CAPTURE_STATUS_DATA::ID => {
32373                CAMERA_CAPTURE_STATUS_DATA::deser(version, payload).map(Self::CAMERA_CAPTURE_STATUS)
32374            }
32375            CAMERA_FOV_STATUS_DATA::ID => {
32376                CAMERA_FOV_STATUS_DATA::deser(version, payload).map(Self::CAMERA_FOV_STATUS)
32377            }
32378            CAMERA_IMAGE_CAPTURED_DATA::ID => {
32379                CAMERA_IMAGE_CAPTURED_DATA::deser(version, payload).map(Self::CAMERA_IMAGE_CAPTURED)
32380            }
32381            CAMERA_INFORMATION_DATA::ID => {
32382                CAMERA_INFORMATION_DATA::deser(version, payload).map(Self::CAMERA_INFORMATION)
32383            }
32384            CAMERA_SETTINGS_DATA::ID => {
32385                CAMERA_SETTINGS_DATA::deser(version, payload).map(Self::CAMERA_SETTINGS)
32386            }
32387            CAMERA_THERMAL_RANGE_DATA::ID => {
32388                CAMERA_THERMAL_RANGE_DATA::deser(version, payload).map(Self::CAMERA_THERMAL_RANGE)
32389            }
32390            CAMERA_TRACKING_GEO_STATUS_DATA::ID => {
32391                CAMERA_TRACKING_GEO_STATUS_DATA::deser(version, payload)
32392                    .map(Self::CAMERA_TRACKING_GEO_STATUS)
32393            }
32394            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => {
32395                CAMERA_TRACKING_IMAGE_STATUS_DATA::deser(version, payload)
32396                    .map(Self::CAMERA_TRACKING_IMAGE_STATUS)
32397            }
32398            CAMERA_TRIGGER_DATA::ID => {
32399                CAMERA_TRIGGER_DATA::deser(version, payload).map(Self::CAMERA_TRIGGER)
32400            }
32401            CANFD_FRAME_DATA::ID => {
32402                CANFD_FRAME_DATA::deser(version, payload).map(Self::CANFD_FRAME)
32403            }
32404            CAN_FILTER_MODIFY_DATA::ID => {
32405                CAN_FILTER_MODIFY_DATA::deser(version, payload).map(Self::CAN_FILTER_MODIFY)
32406            }
32407            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::deser(version, payload).map(Self::CAN_FRAME),
32408            CELLULAR_CONFIG_DATA::ID => {
32409                CELLULAR_CONFIG_DATA::deser(version, payload).map(Self::CELLULAR_CONFIG)
32410            }
32411            CELLULAR_STATUS_DATA::ID => {
32412                CELLULAR_STATUS_DATA::deser(version, payload).map(Self::CELLULAR_STATUS)
32413            }
32414            CHANGE_OPERATOR_CONTROL_DATA::ID => {
32415                CHANGE_OPERATOR_CONTROL_DATA::deser(version, payload)
32416                    .map(Self::CHANGE_OPERATOR_CONTROL)
32417            }
32418            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => {
32419                CHANGE_OPERATOR_CONTROL_ACK_DATA::deser(version, payload)
32420                    .map(Self::CHANGE_OPERATOR_CONTROL_ACK)
32421            }
32422            COLLISION_DATA::ID => COLLISION_DATA::deser(version, payload).map(Self::COLLISION),
32423            COMMAND_ACK_DATA::ID => {
32424                COMMAND_ACK_DATA::deser(version, payload).map(Self::COMMAND_ACK)
32425            }
32426            COMMAND_CANCEL_DATA::ID => {
32427                COMMAND_CANCEL_DATA::deser(version, payload).map(Self::COMMAND_CANCEL)
32428            }
32429            COMMAND_INT_DATA::ID => {
32430                COMMAND_INT_DATA::deser(version, payload).map(Self::COMMAND_INT)
32431            }
32432            COMMAND_LONG_DATA::ID => {
32433                COMMAND_LONG_DATA::deser(version, payload).map(Self::COMMAND_LONG)
32434            }
32435            COMPONENT_INFORMATION_DATA::ID => {
32436                COMPONENT_INFORMATION_DATA::deser(version, payload).map(Self::COMPONENT_INFORMATION)
32437            }
32438            COMPONENT_INFORMATION_BASIC_DATA::ID => {
32439                COMPONENT_INFORMATION_BASIC_DATA::deser(version, payload)
32440                    .map(Self::COMPONENT_INFORMATION_BASIC)
32441            }
32442            COMPONENT_METADATA_DATA::ID => {
32443                COMPONENT_METADATA_DATA::deser(version, payload).map(Self::COMPONENT_METADATA)
32444            }
32445            CONTROL_SYSTEM_STATE_DATA::ID => {
32446                CONTROL_SYSTEM_STATE_DATA::deser(version, payload).map(Self::CONTROL_SYSTEM_STATE)
32447            }
32448            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::deser(version, payload)
32449                .map(Self::CURRENT_EVENT_SEQUENCE),
32450            CURRENT_MODE_DATA::ID => {
32451                CURRENT_MODE_DATA::deser(version, payload).map(Self::CURRENT_MODE)
32452            }
32453            DATA_STREAM_DATA::ID => {
32454                DATA_STREAM_DATA::deser(version, payload).map(Self::DATA_STREAM)
32455            }
32456            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => {
32457                DATA_TRANSMISSION_HANDSHAKE_DATA::deser(version, payload)
32458                    .map(Self::DATA_TRANSMISSION_HANDSHAKE)
32459            }
32460            DEBUG_DATA::ID => DEBUG_DATA::deser(version, payload).map(Self::DEBUG),
32461            DEBUG_FLOAT_ARRAY_DATA::ID => {
32462                DEBUG_FLOAT_ARRAY_DATA::deser(version, payload).map(Self::DEBUG_FLOAT_ARRAY)
32463            }
32464            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::deser(version, payload).map(Self::DEBUG_VECT),
32465            DISTANCE_SENSOR_DATA::ID => {
32466                DISTANCE_SENSOR_DATA::deser(version, payload).map(Self::DISTANCE_SENSOR)
32467            }
32468            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::deser(version, payload).map(Self::EFI_STATUS),
32469            ENCAPSULATED_DATA_DATA::ID => {
32470                ENCAPSULATED_DATA_DATA::deser(version, payload).map(Self::ENCAPSULATED_DATA)
32471            }
32472            ESC_INFO_DATA::ID => ESC_INFO_DATA::deser(version, payload).map(Self::ESC_INFO),
32473            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::deser(version, payload).map(Self::ESC_STATUS),
32474            ESTIMATOR_STATUS_DATA::ID => {
32475                ESTIMATOR_STATUS_DATA::deser(version, payload).map(Self::ESTIMATOR_STATUS)
32476            }
32477            EVENT_DATA::ID => EVENT_DATA::deser(version, payload).map(Self::EVENT),
32478            EXTENDED_SYS_STATE_DATA::ID => {
32479                EXTENDED_SYS_STATE_DATA::deser(version, payload).map(Self::EXTENDED_SYS_STATE)
32480            }
32481            FENCE_STATUS_DATA::ID => {
32482                FENCE_STATUS_DATA::deser(version, payload).map(Self::FENCE_STATUS)
32483            }
32484            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::deser(version, payload)
32485                .map(Self::FILE_TRANSFER_PROTOCOL),
32486            FLIGHT_INFORMATION_DATA::ID => {
32487                FLIGHT_INFORMATION_DATA::deser(version, payload).map(Self::FLIGHT_INFORMATION)
32488            }
32489            FOLLOW_TARGET_DATA::ID => {
32490                FOLLOW_TARGET_DATA::deser(version, payload).map(Self::FOLLOW_TARGET)
32491            }
32492            FUEL_STATUS_DATA::ID => {
32493                FUEL_STATUS_DATA::deser(version, payload).map(Self::FUEL_STATUS)
32494            }
32495            GENERATOR_STATUS_DATA::ID => {
32496                GENERATOR_STATUS_DATA::deser(version, payload).map(Self::GENERATOR_STATUS)
32497            }
32498            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => {
32499                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::deser(version, payload)
32500                    .map(Self::GIMBAL_DEVICE_ATTITUDE_STATUS)
32501            }
32502            GIMBAL_DEVICE_INFORMATION_DATA::ID => {
32503                GIMBAL_DEVICE_INFORMATION_DATA::deser(version, payload)
32504                    .map(Self::GIMBAL_DEVICE_INFORMATION)
32505            }
32506            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => {
32507                GIMBAL_DEVICE_SET_ATTITUDE_DATA::deser(version, payload)
32508                    .map(Self::GIMBAL_DEVICE_SET_ATTITUDE)
32509            }
32510            GIMBAL_MANAGER_INFORMATION_DATA::ID => {
32511                GIMBAL_MANAGER_INFORMATION_DATA::deser(version, payload)
32512                    .map(Self::GIMBAL_MANAGER_INFORMATION)
32513            }
32514            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => {
32515                GIMBAL_MANAGER_SET_ATTITUDE_DATA::deser(version, payload)
32516                    .map(Self::GIMBAL_MANAGER_SET_ATTITUDE)
32517            }
32518            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
32519                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::deser(version, payload)
32520                    .map(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL)
32521            }
32522            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => {
32523                GIMBAL_MANAGER_SET_PITCHYAW_DATA::deser(version, payload)
32524                    .map(Self::GIMBAL_MANAGER_SET_PITCHYAW)
32525            }
32526            GIMBAL_MANAGER_STATUS_DATA::ID => {
32527                GIMBAL_MANAGER_STATUS_DATA::deser(version, payload).map(Self::GIMBAL_MANAGER_STATUS)
32528            }
32529            GLOBAL_POSITION_INT_DATA::ID => {
32530                GLOBAL_POSITION_INT_DATA::deser(version, payload).map(Self::GLOBAL_POSITION_INT)
32531            }
32532            GLOBAL_POSITION_INT_COV_DATA::ID => {
32533                GLOBAL_POSITION_INT_COV_DATA::deser(version, payload)
32534                    .map(Self::GLOBAL_POSITION_INT_COV)
32535            }
32536            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
32537                GLOBAL_VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
32538                    .map(Self::GLOBAL_VISION_POSITION_ESTIMATE)
32539            }
32540            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::deser(version, payload).map(Self::GPS2_RAW),
32541            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::deser(version, payload).map(Self::GPS2_RTK),
32542            GPS_GLOBAL_ORIGIN_DATA::ID => {
32543                GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::GPS_GLOBAL_ORIGIN)
32544            }
32545            GPS_INJECT_DATA_DATA::ID => {
32546                GPS_INJECT_DATA_DATA::deser(version, payload).map(Self::GPS_INJECT_DATA)
32547            }
32548            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::deser(version, payload).map(Self::GPS_INPUT),
32549            GPS_RAW_INT_DATA::ID => {
32550                GPS_RAW_INT_DATA::deser(version, payload).map(Self::GPS_RAW_INT)
32551            }
32552            GPS_RTCM_DATA_DATA::ID => {
32553                GPS_RTCM_DATA_DATA::deser(version, payload).map(Self::GPS_RTCM_DATA)
32554            }
32555            GPS_RTK_DATA::ID => GPS_RTK_DATA::deser(version, payload).map(Self::GPS_RTK),
32556            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::deser(version, payload).map(Self::GPS_STATUS),
32557            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::deser(version, payload).map(Self::HEARTBEAT),
32558            HIGHRES_IMU_DATA::ID => {
32559                HIGHRES_IMU_DATA::deser(version, payload).map(Self::HIGHRES_IMU)
32560            }
32561            HIGH_LATENCY_DATA::ID => {
32562                HIGH_LATENCY_DATA::deser(version, payload).map(Self::HIGH_LATENCY)
32563            }
32564            HIGH_LATENCY2_DATA::ID => {
32565                HIGH_LATENCY2_DATA::deser(version, payload).map(Self::HIGH_LATENCY2)
32566            }
32567            HIL_ACTUATOR_CONTROLS_DATA::ID => {
32568                HIL_ACTUATOR_CONTROLS_DATA::deser(version, payload).map(Self::HIL_ACTUATOR_CONTROLS)
32569            }
32570            HIL_CONTROLS_DATA::ID => {
32571                HIL_CONTROLS_DATA::deser(version, payload).map(Self::HIL_CONTROLS)
32572            }
32573            HIL_GPS_DATA::ID => HIL_GPS_DATA::deser(version, payload).map(Self::HIL_GPS),
32574            HIL_OPTICAL_FLOW_DATA::ID => {
32575                HIL_OPTICAL_FLOW_DATA::deser(version, payload).map(Self::HIL_OPTICAL_FLOW)
32576            }
32577            HIL_RC_INPUTS_RAW_DATA::ID => {
32578                HIL_RC_INPUTS_RAW_DATA::deser(version, payload).map(Self::HIL_RC_INPUTS_RAW)
32579            }
32580            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::deser(version, payload).map(Self::HIL_SENSOR),
32581            HIL_STATE_DATA::ID => HIL_STATE_DATA::deser(version, payload).map(Self::HIL_STATE),
32582            HIL_STATE_QUATERNION_DATA::ID => {
32583                HIL_STATE_QUATERNION_DATA::deser(version, payload).map(Self::HIL_STATE_QUATERNION)
32584            }
32585            HOME_POSITION_DATA::ID => {
32586                HOME_POSITION_DATA::deser(version, payload).map(Self::HOME_POSITION)
32587            }
32588            HYGROMETER_SENSOR_DATA::ID => {
32589                HYGROMETER_SENSOR_DATA::deser(version, payload).map(Self::HYGROMETER_SENSOR)
32590            }
32591            ILLUMINATOR_STATUS_DATA::ID => {
32592                ILLUMINATOR_STATUS_DATA::deser(version, payload).map(Self::ILLUMINATOR_STATUS)
32593            }
32594            ISBD_LINK_STATUS_DATA::ID => {
32595                ISBD_LINK_STATUS_DATA::deser(version, payload).map(Self::ISBD_LINK_STATUS)
32596            }
32597            LANDING_TARGET_DATA::ID => {
32598                LANDING_TARGET_DATA::deser(version, payload).map(Self::LANDING_TARGET)
32599            }
32600            LINK_NODE_STATUS_DATA::ID => {
32601                LINK_NODE_STATUS_DATA::deser(version, payload).map(Self::LINK_NODE_STATUS)
32602            }
32603            LOCAL_POSITION_NED_DATA::ID => {
32604                LOCAL_POSITION_NED_DATA::deser(version, payload).map(Self::LOCAL_POSITION_NED)
32605            }
32606            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::deser(version, payload)
32607                .map(Self::LOCAL_POSITION_NED_COV),
32608            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
32609                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::deser(version, payload)
32610                    .map(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET)
32611            }
32612            LOGGING_ACK_DATA::ID => {
32613                LOGGING_ACK_DATA::deser(version, payload).map(Self::LOGGING_ACK)
32614            }
32615            LOGGING_DATA_DATA::ID => {
32616                LOGGING_DATA_DATA::deser(version, payload).map(Self::LOGGING_DATA)
32617            }
32618            LOGGING_DATA_ACKED_DATA::ID => {
32619                LOGGING_DATA_ACKED_DATA::deser(version, payload).map(Self::LOGGING_DATA_ACKED)
32620            }
32621            LOG_DATA_DATA::ID => LOG_DATA_DATA::deser(version, payload).map(Self::LOG_DATA),
32622            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::deser(version, payload).map(Self::LOG_ENTRY),
32623            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::deser(version, payload).map(Self::LOG_ERASE),
32624            LOG_REQUEST_DATA_DATA::ID => {
32625                LOG_REQUEST_DATA_DATA::deser(version, payload).map(Self::LOG_REQUEST_DATA)
32626            }
32627            LOG_REQUEST_END_DATA::ID => {
32628                LOG_REQUEST_END_DATA::deser(version, payload).map(Self::LOG_REQUEST_END)
32629            }
32630            LOG_REQUEST_LIST_DATA::ID => {
32631                LOG_REQUEST_LIST_DATA::deser(version, payload).map(Self::LOG_REQUEST_LIST)
32632            }
32633            MAG_CAL_REPORT_DATA::ID => {
32634                MAG_CAL_REPORT_DATA::deser(version, payload).map(Self::MAG_CAL_REPORT)
32635            }
32636            MANUAL_CONTROL_DATA::ID => {
32637                MANUAL_CONTROL_DATA::deser(version, payload).map(Self::MANUAL_CONTROL)
32638            }
32639            MANUAL_SETPOINT_DATA::ID => {
32640                MANUAL_SETPOINT_DATA::deser(version, payload).map(Self::MANUAL_SETPOINT)
32641            }
32642            MEMORY_VECT_DATA::ID => {
32643                MEMORY_VECT_DATA::deser(version, payload).map(Self::MEMORY_VECT)
32644            }
32645            MESSAGE_INTERVAL_DATA::ID => {
32646                MESSAGE_INTERVAL_DATA::deser(version, payload).map(Self::MESSAGE_INTERVAL)
32647            }
32648            MISSION_ACK_DATA::ID => {
32649                MISSION_ACK_DATA::deser(version, payload).map(Self::MISSION_ACK)
32650            }
32651            MISSION_CLEAR_ALL_DATA::ID => {
32652                MISSION_CLEAR_ALL_DATA::deser(version, payload).map(Self::MISSION_CLEAR_ALL)
32653            }
32654            MISSION_COUNT_DATA::ID => {
32655                MISSION_COUNT_DATA::deser(version, payload).map(Self::MISSION_COUNT)
32656            }
32657            MISSION_CURRENT_DATA::ID => {
32658                MISSION_CURRENT_DATA::deser(version, payload).map(Self::MISSION_CURRENT)
32659            }
32660            MISSION_ITEM_DATA::ID => {
32661                MISSION_ITEM_DATA::deser(version, payload).map(Self::MISSION_ITEM)
32662            }
32663            MISSION_ITEM_INT_DATA::ID => {
32664                MISSION_ITEM_INT_DATA::deser(version, payload).map(Self::MISSION_ITEM_INT)
32665            }
32666            MISSION_ITEM_REACHED_DATA::ID => {
32667                MISSION_ITEM_REACHED_DATA::deser(version, payload).map(Self::MISSION_ITEM_REACHED)
32668            }
32669            MISSION_REQUEST_DATA::ID => {
32670                MISSION_REQUEST_DATA::deser(version, payload).map(Self::MISSION_REQUEST)
32671            }
32672            MISSION_REQUEST_INT_DATA::ID => {
32673                MISSION_REQUEST_INT_DATA::deser(version, payload).map(Self::MISSION_REQUEST_INT)
32674            }
32675            MISSION_REQUEST_LIST_DATA::ID => {
32676                MISSION_REQUEST_LIST_DATA::deser(version, payload).map(Self::MISSION_REQUEST_LIST)
32677            }
32678            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => {
32679                MISSION_REQUEST_PARTIAL_LIST_DATA::deser(version, payload)
32680                    .map(Self::MISSION_REQUEST_PARTIAL_LIST)
32681            }
32682            MISSION_SET_CURRENT_DATA::ID => {
32683                MISSION_SET_CURRENT_DATA::deser(version, payload).map(Self::MISSION_SET_CURRENT)
32684            }
32685            MISSION_WRITE_PARTIAL_LIST_DATA::ID => {
32686                MISSION_WRITE_PARTIAL_LIST_DATA::deser(version, payload)
32687                    .map(Self::MISSION_WRITE_PARTIAL_LIST)
32688            }
32689            MOUNT_ORIENTATION_DATA::ID => {
32690                MOUNT_ORIENTATION_DATA::deser(version, payload).map(Self::MOUNT_ORIENTATION)
32691            }
32692            NAMED_VALUE_FLOAT_DATA::ID => {
32693                NAMED_VALUE_FLOAT_DATA::deser(version, payload).map(Self::NAMED_VALUE_FLOAT)
32694            }
32695            NAMED_VALUE_INT_DATA::ID => {
32696                NAMED_VALUE_INT_DATA::deser(version, payload).map(Self::NAMED_VALUE_INT)
32697            }
32698            NAV_CONTROLLER_OUTPUT_DATA::ID => {
32699                NAV_CONTROLLER_OUTPUT_DATA::deser(version, payload).map(Self::NAV_CONTROLLER_OUTPUT)
32700            }
32701            OBSTACLE_DISTANCE_DATA::ID => {
32702                OBSTACLE_DISTANCE_DATA::deser(version, payload).map(Self::OBSTACLE_DISTANCE)
32703            }
32704            ODOMETRY_DATA::ID => ODOMETRY_DATA::deser(version, payload).map(Self::ODOMETRY),
32705            ONBOARD_COMPUTER_STATUS_DATA::ID => {
32706                ONBOARD_COMPUTER_STATUS_DATA::deser(version, payload)
32707                    .map(Self::ONBOARD_COMPUTER_STATUS)
32708            }
32709            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => {
32710                OPEN_DRONE_ID_ARM_STATUS_DATA::deser(version, payload)
32711                    .map(Self::OPEN_DRONE_ID_ARM_STATUS)
32712            }
32713            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => {
32714                OPEN_DRONE_ID_AUTHENTICATION_DATA::deser(version, payload)
32715                    .map(Self::OPEN_DRONE_ID_AUTHENTICATION)
32716            }
32717            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::deser(version, payload)
32718                .map(Self::OPEN_DRONE_ID_BASIC_ID),
32719            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::deser(version, payload)
32720                .map(Self::OPEN_DRONE_ID_LOCATION),
32721            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => {
32722                OPEN_DRONE_ID_MESSAGE_PACK_DATA::deser(version, payload)
32723                    .map(Self::OPEN_DRONE_ID_MESSAGE_PACK)
32724            }
32725            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => {
32726                OPEN_DRONE_ID_OPERATOR_ID_DATA::deser(version, payload)
32727                    .map(Self::OPEN_DRONE_ID_OPERATOR_ID)
32728            }
32729            OPEN_DRONE_ID_SELF_ID_DATA::ID => {
32730                OPEN_DRONE_ID_SELF_ID_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SELF_ID)
32731            }
32732            OPEN_DRONE_ID_SYSTEM_DATA::ID => {
32733                OPEN_DRONE_ID_SYSTEM_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SYSTEM)
32734            }
32735            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => {
32736                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::deser(version, payload)
32737                    .map(Self::OPEN_DRONE_ID_SYSTEM_UPDATE)
32738            }
32739            OPTICAL_FLOW_DATA::ID => {
32740                OPTICAL_FLOW_DATA::deser(version, payload).map(Self::OPTICAL_FLOW)
32741            }
32742            OPTICAL_FLOW_RAD_DATA::ID => {
32743                OPTICAL_FLOW_RAD_DATA::deser(version, payload).map(Self::OPTICAL_FLOW_RAD)
32744            }
32745            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::deser(version, payload)
32746                .map(Self::ORBIT_EXECUTION_STATUS),
32747            PARAM_EXT_ACK_DATA::ID => {
32748                PARAM_EXT_ACK_DATA::deser(version, payload).map(Self::PARAM_EXT_ACK)
32749            }
32750            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::deser(version, payload)
32751                .map(Self::PARAM_EXT_REQUEST_LIST),
32752            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::deser(version, payload)
32753                .map(Self::PARAM_EXT_REQUEST_READ),
32754            PARAM_EXT_SET_DATA::ID => {
32755                PARAM_EXT_SET_DATA::deser(version, payload).map(Self::PARAM_EXT_SET)
32756            }
32757            PARAM_EXT_VALUE_DATA::ID => {
32758                PARAM_EXT_VALUE_DATA::deser(version, payload).map(Self::PARAM_EXT_VALUE)
32759            }
32760            PARAM_MAP_RC_DATA::ID => {
32761                PARAM_MAP_RC_DATA::deser(version, payload).map(Self::PARAM_MAP_RC)
32762            }
32763            PARAM_REQUEST_LIST_DATA::ID => {
32764                PARAM_REQUEST_LIST_DATA::deser(version, payload).map(Self::PARAM_REQUEST_LIST)
32765            }
32766            PARAM_REQUEST_READ_DATA::ID => {
32767                PARAM_REQUEST_READ_DATA::deser(version, payload).map(Self::PARAM_REQUEST_READ)
32768            }
32769            PARAM_SET_DATA::ID => PARAM_SET_DATA::deser(version, payload).map(Self::PARAM_SET),
32770            PARAM_VALUE_DATA::ID => {
32771                PARAM_VALUE_DATA::deser(version, payload).map(Self::PARAM_VALUE)
32772            }
32773            PING_DATA::ID => PING_DATA::deser(version, payload).map(Self::PING),
32774            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::deser(version, payload).map(Self::PLAY_TUNE),
32775            PLAY_TUNE_V2_DATA::ID => {
32776                PLAY_TUNE_V2_DATA::deser(version, payload).map(Self::PLAY_TUNE_V2)
32777            }
32778            POSITION_TARGET_GLOBAL_INT_DATA::ID => {
32779                POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
32780                    .map(Self::POSITION_TARGET_GLOBAL_INT)
32781            }
32782            POSITION_TARGET_LOCAL_NED_DATA::ID => {
32783                POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
32784                    .map(Self::POSITION_TARGET_LOCAL_NED)
32785            }
32786            POWER_STATUS_DATA::ID => {
32787                POWER_STATUS_DATA::deser(version, payload).map(Self::POWER_STATUS)
32788            }
32789            PROTOCOL_VERSION_DATA::ID => {
32790                PROTOCOL_VERSION_DATA::deser(version, payload).map(Self::PROTOCOL_VERSION)
32791            }
32792            RADIO_STATUS_DATA::ID => {
32793                RADIO_STATUS_DATA::deser(version, payload).map(Self::RADIO_STATUS)
32794            }
32795            RAW_IMU_DATA::ID => RAW_IMU_DATA::deser(version, payload).map(Self::RAW_IMU),
32796            RAW_PRESSURE_DATA::ID => {
32797                RAW_PRESSURE_DATA::deser(version, payload).map(Self::RAW_PRESSURE)
32798            }
32799            RAW_RPM_DATA::ID => RAW_RPM_DATA::deser(version, payload).map(Self::RAW_RPM),
32800            RC_CHANNELS_DATA::ID => {
32801                RC_CHANNELS_DATA::deser(version, payload).map(Self::RC_CHANNELS)
32802            }
32803            RC_CHANNELS_OVERRIDE_DATA::ID => {
32804                RC_CHANNELS_OVERRIDE_DATA::deser(version, payload).map(Self::RC_CHANNELS_OVERRIDE)
32805            }
32806            RC_CHANNELS_RAW_DATA::ID => {
32807                RC_CHANNELS_RAW_DATA::deser(version, payload).map(Self::RC_CHANNELS_RAW)
32808            }
32809            RC_CHANNELS_SCALED_DATA::ID => {
32810                RC_CHANNELS_SCALED_DATA::deser(version, payload).map(Self::RC_CHANNELS_SCALED)
32811            }
32812            REQUEST_DATA_STREAM_DATA::ID => {
32813                REQUEST_DATA_STREAM_DATA::deser(version, payload).map(Self::REQUEST_DATA_STREAM)
32814            }
32815            REQUEST_EVENT_DATA::ID => {
32816                REQUEST_EVENT_DATA::deser(version, payload).map(Self::REQUEST_EVENT)
32817            }
32818            RESOURCE_REQUEST_DATA::ID => {
32819                RESOURCE_REQUEST_DATA::deser(version, payload).map(Self::RESOURCE_REQUEST)
32820            }
32821            RESPONSE_EVENT_ERROR_DATA::ID => {
32822                RESPONSE_EVENT_ERROR_DATA::deser(version, payload).map(Self::RESPONSE_EVENT_ERROR)
32823            }
32824            SAFETY_ALLOWED_AREA_DATA::ID => {
32825                SAFETY_ALLOWED_AREA_DATA::deser(version, payload).map(Self::SAFETY_ALLOWED_AREA)
32826            }
32827            SAFETY_SET_ALLOWED_AREA_DATA::ID => {
32828                SAFETY_SET_ALLOWED_AREA_DATA::deser(version, payload)
32829                    .map(Self::SAFETY_SET_ALLOWED_AREA)
32830            }
32831            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::deser(version, payload).map(Self::SCALED_IMU),
32832            SCALED_IMU2_DATA::ID => {
32833                SCALED_IMU2_DATA::deser(version, payload).map(Self::SCALED_IMU2)
32834            }
32835            SCALED_IMU3_DATA::ID => {
32836                SCALED_IMU3_DATA::deser(version, payload).map(Self::SCALED_IMU3)
32837            }
32838            SCALED_PRESSURE_DATA::ID => {
32839                SCALED_PRESSURE_DATA::deser(version, payload).map(Self::SCALED_PRESSURE)
32840            }
32841            SCALED_PRESSURE2_DATA::ID => {
32842                SCALED_PRESSURE2_DATA::deser(version, payload).map(Self::SCALED_PRESSURE2)
32843            }
32844            SCALED_PRESSURE3_DATA::ID => {
32845                SCALED_PRESSURE3_DATA::deser(version, payload).map(Self::SCALED_PRESSURE3)
32846            }
32847            SERIAL_CONTROL_DATA::ID => {
32848                SERIAL_CONTROL_DATA::deser(version, payload).map(Self::SERIAL_CONTROL)
32849            }
32850            SERVO_OUTPUT_RAW_DATA::ID => {
32851                SERVO_OUTPUT_RAW_DATA::deser(version, payload).map(Self::SERVO_OUTPUT_RAW)
32852            }
32853            SETUP_SIGNING_DATA::ID => {
32854                SETUP_SIGNING_DATA::deser(version, payload).map(Self::SETUP_SIGNING)
32855            }
32856            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => {
32857                SET_ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
32858                    .map(Self::SET_ACTUATOR_CONTROL_TARGET)
32859            }
32860            SET_ATTITUDE_TARGET_DATA::ID => {
32861                SET_ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::SET_ATTITUDE_TARGET)
32862            }
32863            SET_GPS_GLOBAL_ORIGIN_DATA::ID => {
32864                SET_GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::SET_GPS_GLOBAL_ORIGIN)
32865            }
32866            SET_HOME_POSITION_DATA::ID => {
32867                SET_HOME_POSITION_DATA::deser(version, payload).map(Self::SET_HOME_POSITION)
32868            }
32869            SET_MODE_DATA::ID => SET_MODE_DATA::deser(version, payload).map(Self::SET_MODE),
32870            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
32871                SET_POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
32872                    .map(Self::SET_POSITION_TARGET_GLOBAL_INT)
32873            }
32874            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => {
32875                SET_POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
32876                    .map(Self::SET_POSITION_TARGET_LOCAL_NED)
32877            }
32878            SIM_STATE_DATA::ID => SIM_STATE_DATA::deser(version, payload).map(Self::SIM_STATE),
32879            SMART_BATTERY_INFO_DATA::ID => {
32880                SMART_BATTERY_INFO_DATA::deser(version, payload).map(Self::SMART_BATTERY_INFO)
32881            }
32882            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::deser(version, payload).map(Self::STATUSTEXT),
32883            STORAGE_INFORMATION_DATA::ID => {
32884                STORAGE_INFORMATION_DATA::deser(version, payload).map(Self::STORAGE_INFORMATION)
32885            }
32886            SUPPORTED_TUNES_DATA::ID => {
32887                SUPPORTED_TUNES_DATA::deser(version, payload).map(Self::SUPPORTED_TUNES)
32888            }
32889            SYSTEM_TIME_DATA::ID => {
32890                SYSTEM_TIME_DATA::deser(version, payload).map(Self::SYSTEM_TIME)
32891            }
32892            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::deser(version, payload).map(Self::SYS_STATUS),
32893            TERRAIN_CHECK_DATA::ID => {
32894                TERRAIN_CHECK_DATA::deser(version, payload).map(Self::TERRAIN_CHECK)
32895            }
32896            TERRAIN_DATA_DATA::ID => {
32897                TERRAIN_DATA_DATA::deser(version, payload).map(Self::TERRAIN_DATA)
32898            }
32899            TERRAIN_REPORT_DATA::ID => {
32900                TERRAIN_REPORT_DATA::deser(version, payload).map(Self::TERRAIN_REPORT)
32901            }
32902            TERRAIN_REQUEST_DATA::ID => {
32903                TERRAIN_REQUEST_DATA::deser(version, payload).map(Self::TERRAIN_REQUEST)
32904            }
32905            TIMESYNC_DATA::ID => TIMESYNC_DATA::deser(version, payload).map(Self::TIMESYNC),
32906            TIME_ESTIMATE_TO_TARGET_DATA::ID => {
32907                TIME_ESTIMATE_TO_TARGET_DATA::deser(version, payload)
32908                    .map(Self::TIME_ESTIMATE_TO_TARGET)
32909            }
32910            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
32911                TRAJECTORY_REPRESENTATION_BEZIER_DATA::deser(version, payload)
32912                    .map(Self::TRAJECTORY_REPRESENTATION_BEZIER)
32913            }
32914            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
32915                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::deser(version, payload)
32916                    .map(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS)
32917            }
32918            TUNNEL_DATA::ID => TUNNEL_DATA::deser(version, payload).map(Self::TUNNEL),
32919            UAVCAN_NODE_INFO_DATA::ID => {
32920                UAVCAN_NODE_INFO_DATA::deser(version, payload).map(Self::UAVCAN_NODE_INFO)
32921            }
32922            UAVCAN_NODE_STATUS_DATA::ID => {
32923                UAVCAN_NODE_STATUS_DATA::deser(version, payload).map(Self::UAVCAN_NODE_STATUS)
32924            }
32925            UAVIONIX_ADSB_GET_DATA::ID => {
32926                UAVIONIX_ADSB_GET_DATA::deser(version, payload).map(Self::UAVIONIX_ADSB_GET)
32927            }
32928            UAVIONIX_ADSB_OUT_CFG_DATA::ID => {
32929                UAVIONIX_ADSB_OUT_CFG_DATA::deser(version, payload).map(Self::UAVIONIX_ADSB_OUT_CFG)
32930            }
32931            UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA::ID => {
32932                UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA::deser(version, payload)
32933                    .map(Self::UAVIONIX_ADSB_OUT_CFG_FLIGHTID)
32934            }
32935            UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA::ID => {
32936                UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA::deser(version, payload)
32937                    .map(Self::UAVIONIX_ADSB_OUT_CFG_REGISTRATION)
32938            }
32939            UAVIONIX_ADSB_OUT_CONTROL_DATA::ID => {
32940                UAVIONIX_ADSB_OUT_CONTROL_DATA::deser(version, payload)
32941                    .map(Self::UAVIONIX_ADSB_OUT_CONTROL)
32942            }
32943            UAVIONIX_ADSB_OUT_DYNAMIC_DATA::ID => {
32944                UAVIONIX_ADSB_OUT_DYNAMIC_DATA::deser(version, payload)
32945                    .map(Self::UAVIONIX_ADSB_OUT_DYNAMIC)
32946            }
32947            UAVIONIX_ADSB_OUT_STATUS_DATA::ID => {
32948                UAVIONIX_ADSB_OUT_STATUS_DATA::deser(version, payload)
32949                    .map(Self::UAVIONIX_ADSB_OUT_STATUS)
32950            }
32951            UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA::ID => {
32952                UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA::deser(version, payload)
32953                    .map(Self::UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT)
32954            }
32955            UTM_GLOBAL_POSITION_DATA::ID => {
32956                UTM_GLOBAL_POSITION_DATA::deser(version, payload).map(Self::UTM_GLOBAL_POSITION)
32957            }
32958            V2_EXTENSION_DATA::ID => {
32959                V2_EXTENSION_DATA::deser(version, payload).map(Self::V2_EXTENSION)
32960            }
32961            VFR_HUD_DATA::ID => VFR_HUD_DATA::deser(version, payload).map(Self::VFR_HUD),
32962            VIBRATION_DATA::ID => VIBRATION_DATA::deser(version, payload).map(Self::VIBRATION),
32963            VICON_POSITION_ESTIMATE_DATA::ID => {
32964                VICON_POSITION_ESTIMATE_DATA::deser(version, payload)
32965                    .map(Self::VICON_POSITION_ESTIMATE)
32966            }
32967            VIDEO_STREAM_INFORMATION_DATA::ID => {
32968                VIDEO_STREAM_INFORMATION_DATA::deser(version, payload)
32969                    .map(Self::VIDEO_STREAM_INFORMATION)
32970            }
32971            VIDEO_STREAM_STATUS_DATA::ID => {
32972                VIDEO_STREAM_STATUS_DATA::deser(version, payload).map(Self::VIDEO_STREAM_STATUS)
32973            }
32974            VISION_POSITION_ESTIMATE_DATA::ID => {
32975                VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
32976                    .map(Self::VISION_POSITION_ESTIMATE)
32977            }
32978            VISION_SPEED_ESTIMATE_DATA::ID => {
32979                VISION_SPEED_ESTIMATE_DATA::deser(version, payload).map(Self::VISION_SPEED_ESTIMATE)
32980            }
32981            WHEEL_DISTANCE_DATA::ID => {
32982                WHEEL_DISTANCE_DATA::deser(version, payload).map(Self::WHEEL_DISTANCE)
32983            }
32984            WIFI_CONFIG_AP_DATA::ID => {
32985                WIFI_CONFIG_AP_DATA::deser(version, payload).map(Self::WIFI_CONFIG_AP)
32986            }
32987            WINCH_STATUS_DATA::ID => {
32988                WINCH_STATUS_DATA::deser(version, payload).map(Self::WINCH_STATUS)
32989            }
32990            WIND_COV_DATA::ID => WIND_COV_DATA::deser(version, payload).map(Self::WIND_COV),
32991            _ => Err(::mavlink_core::error::ParserError::UnknownMessage { id }),
32992        }
32993    }
32994    fn message_name(&self) -> &'static str {
32995        match self {
32996            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::NAME,
32997            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::NAME,
32998            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::NAME,
32999            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::NAME,
33000            Self::ALTITUDE(..) => ALTITUDE_DATA::NAME,
33001            Self::ATTITUDE(..) => ATTITUDE_DATA::NAME,
33002            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::NAME,
33003            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::NAME,
33004            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::NAME,
33005            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::NAME,
33006            Self::AUTH_KEY(..) => AUTH_KEY_DATA::NAME,
33007            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
33008                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME
33009            }
33010            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::NAME,
33011            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::NAME,
33012            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::NAME,
33013            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::NAME,
33014            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::NAME,
33015            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::NAME,
33016            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::NAME,
33017            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::NAME,
33018            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::NAME,
33019            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::NAME,
33020            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::NAME,
33021            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::NAME,
33022            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::NAME,
33023            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME,
33024            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::NAME,
33025            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::NAME,
33026            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::NAME,
33027            Self::CAN_FRAME(..) => CAN_FRAME_DATA::NAME,
33028            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::NAME,
33029            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::NAME,
33030            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::NAME,
33031            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME,
33032            Self::COLLISION(..) => COLLISION_DATA::NAME,
33033            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::NAME,
33034            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::NAME,
33035            Self::COMMAND_INT(..) => COMMAND_INT_DATA::NAME,
33036            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::NAME,
33037            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::NAME,
33038            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::NAME,
33039            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::NAME,
33040            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::NAME,
33041            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::NAME,
33042            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::NAME,
33043            Self::DATA_STREAM(..) => DATA_STREAM_DATA::NAME,
33044            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::NAME,
33045            Self::DEBUG(..) => DEBUG_DATA::NAME,
33046            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::NAME,
33047            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::NAME,
33048            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::NAME,
33049            Self::EFI_STATUS(..) => EFI_STATUS_DATA::NAME,
33050            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::NAME,
33051            Self::ESC_INFO(..) => ESC_INFO_DATA::NAME,
33052            Self::ESC_STATUS(..) => ESC_STATUS_DATA::NAME,
33053            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::NAME,
33054            Self::EVENT(..) => EVENT_DATA::NAME,
33055            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::NAME,
33056            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::NAME,
33057            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::NAME,
33058            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::NAME,
33059            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::NAME,
33060            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::NAME,
33061            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::NAME,
33062            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME,
33063            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::NAME,
33064            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME,
33065            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::NAME,
33066            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME,
33067            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
33068                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME
33069            }
33070            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME,
33071            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::NAME,
33072            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::NAME,
33073            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::NAME,
33074            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME,
33075            Self::GPS2_RAW(..) => GPS2_RAW_DATA::NAME,
33076            Self::GPS2_RTK(..) => GPS2_RTK_DATA::NAME,
33077            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::NAME,
33078            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::NAME,
33079            Self::GPS_INPUT(..) => GPS_INPUT_DATA::NAME,
33080            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::NAME,
33081            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::NAME,
33082            Self::GPS_RTK(..) => GPS_RTK_DATA::NAME,
33083            Self::GPS_STATUS(..) => GPS_STATUS_DATA::NAME,
33084            Self::HEARTBEAT(..) => HEARTBEAT_DATA::NAME,
33085            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::NAME,
33086            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::NAME,
33087            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::NAME,
33088            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::NAME,
33089            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::NAME,
33090            Self::HIL_GPS(..) => HIL_GPS_DATA::NAME,
33091            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::NAME,
33092            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::NAME,
33093            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::NAME,
33094            Self::HIL_STATE(..) => HIL_STATE_DATA::NAME,
33095            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::NAME,
33096            Self::HOME_POSITION(..) => HOME_POSITION_DATA::NAME,
33097            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::NAME,
33098            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::NAME,
33099            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::NAME,
33100            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::NAME,
33101            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::NAME,
33102            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::NAME,
33103            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::NAME,
33104            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
33105                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME
33106            }
33107            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::NAME,
33108            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::NAME,
33109            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::NAME,
33110            Self::LOG_DATA(..) => LOG_DATA_DATA::NAME,
33111            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::NAME,
33112            Self::LOG_ERASE(..) => LOG_ERASE_DATA::NAME,
33113            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::NAME,
33114            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::NAME,
33115            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::NAME,
33116            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::NAME,
33117            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::NAME,
33118            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::NAME,
33119            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::NAME,
33120            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::NAME,
33121            Self::MISSION_ACK(..) => MISSION_ACK_DATA::NAME,
33122            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::NAME,
33123            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::NAME,
33124            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::NAME,
33125            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::NAME,
33126            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::NAME,
33127            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::NAME,
33128            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::NAME,
33129            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::NAME,
33130            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::NAME,
33131            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::NAME,
33132            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::NAME,
33133            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::NAME,
33134            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::NAME,
33135            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::NAME,
33136            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::NAME,
33137            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::NAME,
33138            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::NAME,
33139            Self::ODOMETRY(..) => ODOMETRY_DATA::NAME,
33140            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::NAME,
33141            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::NAME,
33142            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME,
33143            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::NAME,
33144            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::NAME,
33145            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME,
33146            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME,
33147            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::NAME,
33148            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::NAME,
33149            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME,
33150            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::NAME,
33151            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::NAME,
33152            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::NAME,
33153            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::NAME,
33154            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::NAME,
33155            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::NAME,
33156            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::NAME,
33157            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::NAME,
33158            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::NAME,
33159            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::NAME,
33160            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::NAME,
33161            Self::PARAM_SET(..) => PARAM_SET_DATA::NAME,
33162            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::NAME,
33163            Self::PING(..) => PING_DATA::NAME,
33164            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::NAME,
33165            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::NAME,
33166            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::NAME,
33167            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::NAME,
33168            Self::POWER_STATUS(..) => POWER_STATUS_DATA::NAME,
33169            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::NAME,
33170            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::NAME,
33171            Self::RAW_IMU(..) => RAW_IMU_DATA::NAME,
33172            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::NAME,
33173            Self::RAW_RPM(..) => RAW_RPM_DATA::NAME,
33174            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::NAME,
33175            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::NAME,
33176            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::NAME,
33177            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::NAME,
33178            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::NAME,
33179            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::NAME,
33180            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::NAME,
33181            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::NAME,
33182            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::NAME,
33183            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::NAME,
33184            Self::SCALED_IMU(..) => SCALED_IMU_DATA::NAME,
33185            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::NAME,
33186            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::NAME,
33187            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::NAME,
33188            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::NAME,
33189            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::NAME,
33190            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::NAME,
33191            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::NAME,
33192            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::NAME,
33193            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::NAME,
33194            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::NAME,
33195            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::NAME,
33196            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::NAME,
33197            Self::SET_MODE(..) => SET_MODE_DATA::NAME,
33198            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME,
33199            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::NAME,
33200            Self::SIM_STATE(..) => SIM_STATE_DATA::NAME,
33201            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::NAME,
33202            Self::STATUSTEXT(..) => STATUSTEXT_DATA::NAME,
33203            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::NAME,
33204            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::NAME,
33205            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::NAME,
33206            Self::SYS_STATUS(..) => SYS_STATUS_DATA::NAME,
33207            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::NAME,
33208            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::NAME,
33209            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::NAME,
33210            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::NAME,
33211            Self::TIMESYNC(..) => TIMESYNC_DATA::NAME,
33212            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::NAME,
33213            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => {
33214                TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME
33215            }
33216            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
33217                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME
33218            }
33219            Self::TUNNEL(..) => TUNNEL_DATA::NAME,
33220            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::NAME,
33221            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::NAME,
33222            Self::UAVIONIX_ADSB_GET(..) => UAVIONIX_ADSB_GET_DATA::NAME,
33223            Self::UAVIONIX_ADSB_OUT_CFG(..) => UAVIONIX_ADSB_OUT_CFG_DATA::NAME,
33224            Self::UAVIONIX_ADSB_OUT_CFG_FLIGHTID(..) => UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA::NAME,
33225            Self::UAVIONIX_ADSB_OUT_CFG_REGISTRATION(..) => {
33226                UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA::NAME
33227            }
33228            Self::UAVIONIX_ADSB_OUT_CONTROL(..) => UAVIONIX_ADSB_OUT_CONTROL_DATA::NAME,
33229            Self::UAVIONIX_ADSB_OUT_DYNAMIC(..) => UAVIONIX_ADSB_OUT_DYNAMIC_DATA::NAME,
33230            Self::UAVIONIX_ADSB_OUT_STATUS(..) => UAVIONIX_ADSB_OUT_STATUS_DATA::NAME,
33231            Self::UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT(..) => {
33232                UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA::NAME
33233            }
33234            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::NAME,
33235            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::NAME,
33236            Self::VFR_HUD(..) => VFR_HUD_DATA::NAME,
33237            Self::VIBRATION(..) => VIBRATION_DATA::NAME,
33238            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::NAME,
33239            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::NAME,
33240            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::NAME,
33241            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::NAME,
33242            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::NAME,
33243            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::NAME,
33244            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::NAME,
33245            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::NAME,
33246            Self::WIND_COV(..) => WIND_COV_DATA::NAME,
33247        }
33248    }
33249    fn message_id(&self) -> u32 {
33250        match self {
33251            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::ID,
33252            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::ID,
33253            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::ID,
33254            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::ID,
33255            Self::ALTITUDE(..) => ALTITUDE_DATA::ID,
33256            Self::ATTITUDE(..) => ATTITUDE_DATA::ID,
33257            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::ID,
33258            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::ID,
33259            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::ID,
33260            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::ID,
33261            Self::AUTH_KEY(..) => AUTH_KEY_DATA::ID,
33262            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
33263                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID
33264            }
33265            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::ID,
33266            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::ID,
33267            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::ID,
33268            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::ID,
33269            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::ID,
33270            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::ID,
33271            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::ID,
33272            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::ID,
33273            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::ID,
33274            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::ID,
33275            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::ID,
33276            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::ID,
33277            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::ID,
33278            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::ID,
33279            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::ID,
33280            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::ID,
33281            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::ID,
33282            Self::CAN_FRAME(..) => CAN_FRAME_DATA::ID,
33283            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::ID,
33284            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::ID,
33285            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::ID,
33286            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::ID,
33287            Self::COLLISION(..) => COLLISION_DATA::ID,
33288            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::ID,
33289            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::ID,
33290            Self::COMMAND_INT(..) => COMMAND_INT_DATA::ID,
33291            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::ID,
33292            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::ID,
33293            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::ID,
33294            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::ID,
33295            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::ID,
33296            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::ID,
33297            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::ID,
33298            Self::DATA_STREAM(..) => DATA_STREAM_DATA::ID,
33299            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::ID,
33300            Self::DEBUG(..) => DEBUG_DATA::ID,
33301            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::ID,
33302            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::ID,
33303            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::ID,
33304            Self::EFI_STATUS(..) => EFI_STATUS_DATA::ID,
33305            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::ID,
33306            Self::ESC_INFO(..) => ESC_INFO_DATA::ID,
33307            Self::ESC_STATUS(..) => ESC_STATUS_DATA::ID,
33308            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::ID,
33309            Self::EVENT(..) => EVENT_DATA::ID,
33310            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::ID,
33311            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::ID,
33312            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::ID,
33313            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::ID,
33314            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::ID,
33315            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::ID,
33316            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::ID,
33317            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID,
33318            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::ID,
33319            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID,
33320            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::ID,
33321            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID,
33322            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
33323                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID
33324            }
33325            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID,
33326            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::ID,
33327            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::ID,
33328            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::ID,
33329            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID,
33330            Self::GPS2_RAW(..) => GPS2_RAW_DATA::ID,
33331            Self::GPS2_RTK(..) => GPS2_RTK_DATA::ID,
33332            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::ID,
33333            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::ID,
33334            Self::GPS_INPUT(..) => GPS_INPUT_DATA::ID,
33335            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::ID,
33336            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::ID,
33337            Self::GPS_RTK(..) => GPS_RTK_DATA::ID,
33338            Self::GPS_STATUS(..) => GPS_STATUS_DATA::ID,
33339            Self::HEARTBEAT(..) => HEARTBEAT_DATA::ID,
33340            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::ID,
33341            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::ID,
33342            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::ID,
33343            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::ID,
33344            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::ID,
33345            Self::HIL_GPS(..) => HIL_GPS_DATA::ID,
33346            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::ID,
33347            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::ID,
33348            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::ID,
33349            Self::HIL_STATE(..) => HIL_STATE_DATA::ID,
33350            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::ID,
33351            Self::HOME_POSITION(..) => HOME_POSITION_DATA::ID,
33352            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::ID,
33353            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::ID,
33354            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::ID,
33355            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::ID,
33356            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::ID,
33357            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::ID,
33358            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::ID,
33359            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
33360                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID
33361            }
33362            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::ID,
33363            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::ID,
33364            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::ID,
33365            Self::LOG_DATA(..) => LOG_DATA_DATA::ID,
33366            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::ID,
33367            Self::LOG_ERASE(..) => LOG_ERASE_DATA::ID,
33368            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::ID,
33369            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::ID,
33370            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::ID,
33371            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::ID,
33372            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::ID,
33373            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::ID,
33374            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::ID,
33375            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::ID,
33376            Self::MISSION_ACK(..) => MISSION_ACK_DATA::ID,
33377            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::ID,
33378            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::ID,
33379            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::ID,
33380            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::ID,
33381            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::ID,
33382            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::ID,
33383            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::ID,
33384            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::ID,
33385            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::ID,
33386            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::ID,
33387            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::ID,
33388            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::ID,
33389            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::ID,
33390            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::ID,
33391            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::ID,
33392            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::ID,
33393            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::ID,
33394            Self::ODOMETRY(..) => ODOMETRY_DATA::ID,
33395            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::ID,
33396            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::ID,
33397            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::ID,
33398            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::ID,
33399            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::ID,
33400            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID,
33401            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::ID,
33402            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::ID,
33403            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::ID,
33404            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID,
33405            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::ID,
33406            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::ID,
33407            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::ID,
33408            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::ID,
33409            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::ID,
33410            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::ID,
33411            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::ID,
33412            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::ID,
33413            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::ID,
33414            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::ID,
33415            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::ID,
33416            Self::PARAM_SET(..) => PARAM_SET_DATA::ID,
33417            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::ID,
33418            Self::PING(..) => PING_DATA::ID,
33419            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::ID,
33420            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::ID,
33421            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::ID,
33422            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::ID,
33423            Self::POWER_STATUS(..) => POWER_STATUS_DATA::ID,
33424            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::ID,
33425            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::ID,
33426            Self::RAW_IMU(..) => RAW_IMU_DATA::ID,
33427            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::ID,
33428            Self::RAW_RPM(..) => RAW_RPM_DATA::ID,
33429            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::ID,
33430            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::ID,
33431            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::ID,
33432            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::ID,
33433            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::ID,
33434            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::ID,
33435            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::ID,
33436            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::ID,
33437            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::ID,
33438            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::ID,
33439            Self::SCALED_IMU(..) => SCALED_IMU_DATA::ID,
33440            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::ID,
33441            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::ID,
33442            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::ID,
33443            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::ID,
33444            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::ID,
33445            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::ID,
33446            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::ID,
33447            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::ID,
33448            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::ID,
33449            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::ID,
33450            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::ID,
33451            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::ID,
33452            Self::SET_MODE(..) => SET_MODE_DATA::ID,
33453            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::ID,
33454            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::ID,
33455            Self::SIM_STATE(..) => SIM_STATE_DATA::ID,
33456            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::ID,
33457            Self::STATUSTEXT(..) => STATUSTEXT_DATA::ID,
33458            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::ID,
33459            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::ID,
33460            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::ID,
33461            Self::SYS_STATUS(..) => SYS_STATUS_DATA::ID,
33462            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::ID,
33463            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::ID,
33464            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::ID,
33465            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::ID,
33466            Self::TIMESYNC(..) => TIMESYNC_DATA::ID,
33467            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::ID,
33468            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID,
33469            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
33470                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID
33471            }
33472            Self::TUNNEL(..) => TUNNEL_DATA::ID,
33473            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::ID,
33474            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::ID,
33475            Self::UAVIONIX_ADSB_GET(..) => UAVIONIX_ADSB_GET_DATA::ID,
33476            Self::UAVIONIX_ADSB_OUT_CFG(..) => UAVIONIX_ADSB_OUT_CFG_DATA::ID,
33477            Self::UAVIONIX_ADSB_OUT_CFG_FLIGHTID(..) => UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA::ID,
33478            Self::UAVIONIX_ADSB_OUT_CFG_REGISTRATION(..) => {
33479                UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA::ID
33480            }
33481            Self::UAVIONIX_ADSB_OUT_CONTROL(..) => UAVIONIX_ADSB_OUT_CONTROL_DATA::ID,
33482            Self::UAVIONIX_ADSB_OUT_DYNAMIC(..) => UAVIONIX_ADSB_OUT_DYNAMIC_DATA::ID,
33483            Self::UAVIONIX_ADSB_OUT_STATUS(..) => UAVIONIX_ADSB_OUT_STATUS_DATA::ID,
33484            Self::UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT(..) => {
33485                UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA::ID
33486            }
33487            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::ID,
33488            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::ID,
33489            Self::VFR_HUD(..) => VFR_HUD_DATA::ID,
33490            Self::VIBRATION(..) => VIBRATION_DATA::ID,
33491            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::ID,
33492            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::ID,
33493            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::ID,
33494            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::ID,
33495            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::ID,
33496            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::ID,
33497            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::ID,
33498            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::ID,
33499            Self::WIND_COV(..) => WIND_COV_DATA::ID,
33500        }
33501    }
33502    fn message_id_from_name(name: &str) -> Option<u32> {
33503        match name {
33504            ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(ACTUATOR_CONTROL_TARGET_DATA::ID),
33505            ACTUATOR_OUTPUT_STATUS_DATA::NAME => Some(ACTUATOR_OUTPUT_STATUS_DATA::ID),
33506            ADSB_VEHICLE_DATA::NAME => Some(ADSB_VEHICLE_DATA::ID),
33507            AIS_VESSEL_DATA::NAME => Some(AIS_VESSEL_DATA::ID),
33508            ALTITUDE_DATA::NAME => Some(ALTITUDE_DATA::ID),
33509            ATTITUDE_DATA::NAME => Some(ATTITUDE_DATA::ID),
33510            ATTITUDE_QUATERNION_DATA::NAME => Some(ATTITUDE_QUATERNION_DATA::ID),
33511            ATTITUDE_QUATERNION_COV_DATA::NAME => Some(ATTITUDE_QUATERNION_COV_DATA::ID),
33512            ATTITUDE_TARGET_DATA::NAME => Some(ATTITUDE_TARGET_DATA::ID),
33513            ATT_POS_MOCAP_DATA::NAME => Some(ATT_POS_MOCAP_DATA::ID),
33514            AUTH_KEY_DATA::NAME => Some(AUTH_KEY_DATA::ID),
33515            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME => {
33516                Some(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID)
33517            }
33518            AUTOPILOT_VERSION_DATA::NAME => Some(AUTOPILOT_VERSION_DATA::ID),
33519            AVAILABLE_MODES_DATA::NAME => Some(AVAILABLE_MODES_DATA::ID),
33520            AVAILABLE_MODES_MONITOR_DATA::NAME => Some(AVAILABLE_MODES_MONITOR_DATA::ID),
33521            BATTERY_INFO_DATA::NAME => Some(BATTERY_INFO_DATA::ID),
33522            BATTERY_STATUS_DATA::NAME => Some(BATTERY_STATUS_DATA::ID),
33523            BUTTON_CHANGE_DATA::NAME => Some(BUTTON_CHANGE_DATA::ID),
33524            CAMERA_CAPTURE_STATUS_DATA::NAME => Some(CAMERA_CAPTURE_STATUS_DATA::ID),
33525            CAMERA_FOV_STATUS_DATA::NAME => Some(CAMERA_FOV_STATUS_DATA::ID),
33526            CAMERA_IMAGE_CAPTURED_DATA::NAME => Some(CAMERA_IMAGE_CAPTURED_DATA::ID),
33527            CAMERA_INFORMATION_DATA::NAME => Some(CAMERA_INFORMATION_DATA::ID),
33528            CAMERA_SETTINGS_DATA::NAME => Some(CAMERA_SETTINGS_DATA::ID),
33529            CAMERA_THERMAL_RANGE_DATA::NAME => Some(CAMERA_THERMAL_RANGE_DATA::ID),
33530            CAMERA_TRACKING_GEO_STATUS_DATA::NAME => Some(CAMERA_TRACKING_GEO_STATUS_DATA::ID),
33531            CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME => Some(CAMERA_TRACKING_IMAGE_STATUS_DATA::ID),
33532            CAMERA_TRIGGER_DATA::NAME => Some(CAMERA_TRIGGER_DATA::ID),
33533            CANFD_FRAME_DATA::NAME => Some(CANFD_FRAME_DATA::ID),
33534            CAN_FILTER_MODIFY_DATA::NAME => Some(CAN_FILTER_MODIFY_DATA::ID),
33535            CAN_FRAME_DATA::NAME => Some(CAN_FRAME_DATA::ID),
33536            CELLULAR_CONFIG_DATA::NAME => Some(CELLULAR_CONFIG_DATA::ID),
33537            CELLULAR_STATUS_DATA::NAME => Some(CELLULAR_STATUS_DATA::ID),
33538            CHANGE_OPERATOR_CONTROL_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_DATA::ID),
33539            CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_ACK_DATA::ID),
33540            COLLISION_DATA::NAME => Some(COLLISION_DATA::ID),
33541            COMMAND_ACK_DATA::NAME => Some(COMMAND_ACK_DATA::ID),
33542            COMMAND_CANCEL_DATA::NAME => Some(COMMAND_CANCEL_DATA::ID),
33543            COMMAND_INT_DATA::NAME => Some(COMMAND_INT_DATA::ID),
33544            COMMAND_LONG_DATA::NAME => Some(COMMAND_LONG_DATA::ID),
33545            COMPONENT_INFORMATION_DATA::NAME => Some(COMPONENT_INFORMATION_DATA::ID),
33546            COMPONENT_INFORMATION_BASIC_DATA::NAME => Some(COMPONENT_INFORMATION_BASIC_DATA::ID),
33547            COMPONENT_METADATA_DATA::NAME => Some(COMPONENT_METADATA_DATA::ID),
33548            CONTROL_SYSTEM_STATE_DATA::NAME => Some(CONTROL_SYSTEM_STATE_DATA::ID),
33549            CURRENT_EVENT_SEQUENCE_DATA::NAME => Some(CURRENT_EVENT_SEQUENCE_DATA::ID),
33550            CURRENT_MODE_DATA::NAME => Some(CURRENT_MODE_DATA::ID),
33551            DATA_STREAM_DATA::NAME => Some(DATA_STREAM_DATA::ID),
33552            DATA_TRANSMISSION_HANDSHAKE_DATA::NAME => Some(DATA_TRANSMISSION_HANDSHAKE_DATA::ID),
33553            DEBUG_DATA::NAME => Some(DEBUG_DATA::ID),
33554            DEBUG_FLOAT_ARRAY_DATA::NAME => Some(DEBUG_FLOAT_ARRAY_DATA::ID),
33555            DEBUG_VECT_DATA::NAME => Some(DEBUG_VECT_DATA::ID),
33556            DISTANCE_SENSOR_DATA::NAME => Some(DISTANCE_SENSOR_DATA::ID),
33557            EFI_STATUS_DATA::NAME => Some(EFI_STATUS_DATA::ID),
33558            ENCAPSULATED_DATA_DATA::NAME => Some(ENCAPSULATED_DATA_DATA::ID),
33559            ESC_INFO_DATA::NAME => Some(ESC_INFO_DATA::ID),
33560            ESC_STATUS_DATA::NAME => Some(ESC_STATUS_DATA::ID),
33561            ESTIMATOR_STATUS_DATA::NAME => Some(ESTIMATOR_STATUS_DATA::ID),
33562            EVENT_DATA::NAME => Some(EVENT_DATA::ID),
33563            EXTENDED_SYS_STATE_DATA::NAME => Some(EXTENDED_SYS_STATE_DATA::ID),
33564            FENCE_STATUS_DATA::NAME => Some(FENCE_STATUS_DATA::ID),
33565            FILE_TRANSFER_PROTOCOL_DATA::NAME => Some(FILE_TRANSFER_PROTOCOL_DATA::ID),
33566            FLIGHT_INFORMATION_DATA::NAME => Some(FLIGHT_INFORMATION_DATA::ID),
33567            FOLLOW_TARGET_DATA::NAME => Some(FOLLOW_TARGET_DATA::ID),
33568            FUEL_STATUS_DATA::NAME => Some(FUEL_STATUS_DATA::ID),
33569            GENERATOR_STATUS_DATA::NAME => Some(GENERATOR_STATUS_DATA::ID),
33570            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME => {
33571                Some(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID)
33572            }
33573            GIMBAL_DEVICE_INFORMATION_DATA::NAME => Some(GIMBAL_DEVICE_INFORMATION_DATA::ID),
33574            GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID),
33575            GIMBAL_MANAGER_INFORMATION_DATA::NAME => Some(GIMBAL_MANAGER_INFORMATION_DATA::ID),
33576            GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID),
33577            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME => {
33578                Some(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID)
33579            }
33580            GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME => Some(GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID),
33581            GIMBAL_MANAGER_STATUS_DATA::NAME => Some(GIMBAL_MANAGER_STATUS_DATA::ID),
33582            GLOBAL_POSITION_INT_DATA::NAME => Some(GLOBAL_POSITION_INT_DATA::ID),
33583            GLOBAL_POSITION_INT_COV_DATA::NAME => Some(GLOBAL_POSITION_INT_COV_DATA::ID),
33584            GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME => {
33585                Some(GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID)
33586            }
33587            GPS2_RAW_DATA::NAME => Some(GPS2_RAW_DATA::ID),
33588            GPS2_RTK_DATA::NAME => Some(GPS2_RTK_DATA::ID),
33589            GPS_GLOBAL_ORIGIN_DATA::NAME => Some(GPS_GLOBAL_ORIGIN_DATA::ID),
33590            GPS_INJECT_DATA_DATA::NAME => Some(GPS_INJECT_DATA_DATA::ID),
33591            GPS_INPUT_DATA::NAME => Some(GPS_INPUT_DATA::ID),
33592            GPS_RAW_INT_DATA::NAME => Some(GPS_RAW_INT_DATA::ID),
33593            GPS_RTCM_DATA_DATA::NAME => Some(GPS_RTCM_DATA_DATA::ID),
33594            GPS_RTK_DATA::NAME => Some(GPS_RTK_DATA::ID),
33595            GPS_STATUS_DATA::NAME => Some(GPS_STATUS_DATA::ID),
33596            HEARTBEAT_DATA::NAME => Some(HEARTBEAT_DATA::ID),
33597            HIGHRES_IMU_DATA::NAME => Some(HIGHRES_IMU_DATA::ID),
33598            HIGH_LATENCY_DATA::NAME => Some(HIGH_LATENCY_DATA::ID),
33599            HIGH_LATENCY2_DATA::NAME => Some(HIGH_LATENCY2_DATA::ID),
33600            HIL_ACTUATOR_CONTROLS_DATA::NAME => Some(HIL_ACTUATOR_CONTROLS_DATA::ID),
33601            HIL_CONTROLS_DATA::NAME => Some(HIL_CONTROLS_DATA::ID),
33602            HIL_GPS_DATA::NAME => Some(HIL_GPS_DATA::ID),
33603            HIL_OPTICAL_FLOW_DATA::NAME => Some(HIL_OPTICAL_FLOW_DATA::ID),
33604            HIL_RC_INPUTS_RAW_DATA::NAME => Some(HIL_RC_INPUTS_RAW_DATA::ID),
33605            HIL_SENSOR_DATA::NAME => Some(HIL_SENSOR_DATA::ID),
33606            HIL_STATE_DATA::NAME => Some(HIL_STATE_DATA::ID),
33607            HIL_STATE_QUATERNION_DATA::NAME => Some(HIL_STATE_QUATERNION_DATA::ID),
33608            HOME_POSITION_DATA::NAME => Some(HOME_POSITION_DATA::ID),
33609            HYGROMETER_SENSOR_DATA::NAME => Some(HYGROMETER_SENSOR_DATA::ID),
33610            ILLUMINATOR_STATUS_DATA::NAME => Some(ILLUMINATOR_STATUS_DATA::ID),
33611            ISBD_LINK_STATUS_DATA::NAME => Some(ISBD_LINK_STATUS_DATA::ID),
33612            LANDING_TARGET_DATA::NAME => Some(LANDING_TARGET_DATA::ID),
33613            LINK_NODE_STATUS_DATA::NAME => Some(LINK_NODE_STATUS_DATA::ID),
33614            LOCAL_POSITION_NED_DATA::NAME => Some(LOCAL_POSITION_NED_DATA::ID),
33615            LOCAL_POSITION_NED_COV_DATA::NAME => Some(LOCAL_POSITION_NED_COV_DATA::ID),
33616            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME => {
33617                Some(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID)
33618            }
33619            LOGGING_ACK_DATA::NAME => Some(LOGGING_ACK_DATA::ID),
33620            LOGGING_DATA_DATA::NAME => Some(LOGGING_DATA_DATA::ID),
33621            LOGGING_DATA_ACKED_DATA::NAME => Some(LOGGING_DATA_ACKED_DATA::ID),
33622            LOG_DATA_DATA::NAME => Some(LOG_DATA_DATA::ID),
33623            LOG_ENTRY_DATA::NAME => Some(LOG_ENTRY_DATA::ID),
33624            LOG_ERASE_DATA::NAME => Some(LOG_ERASE_DATA::ID),
33625            LOG_REQUEST_DATA_DATA::NAME => Some(LOG_REQUEST_DATA_DATA::ID),
33626            LOG_REQUEST_END_DATA::NAME => Some(LOG_REQUEST_END_DATA::ID),
33627            LOG_REQUEST_LIST_DATA::NAME => Some(LOG_REQUEST_LIST_DATA::ID),
33628            MAG_CAL_REPORT_DATA::NAME => Some(MAG_CAL_REPORT_DATA::ID),
33629            MANUAL_CONTROL_DATA::NAME => Some(MANUAL_CONTROL_DATA::ID),
33630            MANUAL_SETPOINT_DATA::NAME => Some(MANUAL_SETPOINT_DATA::ID),
33631            MEMORY_VECT_DATA::NAME => Some(MEMORY_VECT_DATA::ID),
33632            MESSAGE_INTERVAL_DATA::NAME => Some(MESSAGE_INTERVAL_DATA::ID),
33633            MISSION_ACK_DATA::NAME => Some(MISSION_ACK_DATA::ID),
33634            MISSION_CLEAR_ALL_DATA::NAME => Some(MISSION_CLEAR_ALL_DATA::ID),
33635            MISSION_COUNT_DATA::NAME => Some(MISSION_COUNT_DATA::ID),
33636            MISSION_CURRENT_DATA::NAME => Some(MISSION_CURRENT_DATA::ID),
33637            MISSION_ITEM_DATA::NAME => Some(MISSION_ITEM_DATA::ID),
33638            MISSION_ITEM_INT_DATA::NAME => Some(MISSION_ITEM_INT_DATA::ID),
33639            MISSION_ITEM_REACHED_DATA::NAME => Some(MISSION_ITEM_REACHED_DATA::ID),
33640            MISSION_REQUEST_DATA::NAME => Some(MISSION_REQUEST_DATA::ID),
33641            MISSION_REQUEST_INT_DATA::NAME => Some(MISSION_REQUEST_INT_DATA::ID),
33642            MISSION_REQUEST_LIST_DATA::NAME => Some(MISSION_REQUEST_LIST_DATA::ID),
33643            MISSION_REQUEST_PARTIAL_LIST_DATA::NAME => Some(MISSION_REQUEST_PARTIAL_LIST_DATA::ID),
33644            MISSION_SET_CURRENT_DATA::NAME => Some(MISSION_SET_CURRENT_DATA::ID),
33645            MISSION_WRITE_PARTIAL_LIST_DATA::NAME => Some(MISSION_WRITE_PARTIAL_LIST_DATA::ID),
33646            MOUNT_ORIENTATION_DATA::NAME => Some(MOUNT_ORIENTATION_DATA::ID),
33647            NAMED_VALUE_FLOAT_DATA::NAME => Some(NAMED_VALUE_FLOAT_DATA::ID),
33648            NAMED_VALUE_INT_DATA::NAME => Some(NAMED_VALUE_INT_DATA::ID),
33649            NAV_CONTROLLER_OUTPUT_DATA::NAME => Some(NAV_CONTROLLER_OUTPUT_DATA::ID),
33650            OBSTACLE_DISTANCE_DATA::NAME => Some(OBSTACLE_DISTANCE_DATA::ID),
33651            ODOMETRY_DATA::NAME => Some(ODOMETRY_DATA::ID),
33652            ONBOARD_COMPUTER_STATUS_DATA::NAME => Some(ONBOARD_COMPUTER_STATUS_DATA::ID),
33653            OPEN_DRONE_ID_ARM_STATUS_DATA::NAME => Some(OPEN_DRONE_ID_ARM_STATUS_DATA::ID),
33654            OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME => Some(OPEN_DRONE_ID_AUTHENTICATION_DATA::ID),
33655            OPEN_DRONE_ID_BASIC_ID_DATA::NAME => Some(OPEN_DRONE_ID_BASIC_ID_DATA::ID),
33656            OPEN_DRONE_ID_LOCATION_DATA::NAME => Some(OPEN_DRONE_ID_LOCATION_DATA::ID),
33657            OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME => Some(OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID),
33658            OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME => Some(OPEN_DRONE_ID_OPERATOR_ID_DATA::ID),
33659            OPEN_DRONE_ID_SELF_ID_DATA::NAME => Some(OPEN_DRONE_ID_SELF_ID_DATA::ID),
33660            OPEN_DRONE_ID_SYSTEM_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_DATA::ID),
33661            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID),
33662            OPTICAL_FLOW_DATA::NAME => Some(OPTICAL_FLOW_DATA::ID),
33663            OPTICAL_FLOW_RAD_DATA::NAME => Some(OPTICAL_FLOW_RAD_DATA::ID),
33664            ORBIT_EXECUTION_STATUS_DATA::NAME => Some(ORBIT_EXECUTION_STATUS_DATA::ID),
33665            PARAM_EXT_ACK_DATA::NAME => Some(PARAM_EXT_ACK_DATA::ID),
33666            PARAM_EXT_REQUEST_LIST_DATA::NAME => Some(PARAM_EXT_REQUEST_LIST_DATA::ID),
33667            PARAM_EXT_REQUEST_READ_DATA::NAME => Some(PARAM_EXT_REQUEST_READ_DATA::ID),
33668            PARAM_EXT_SET_DATA::NAME => Some(PARAM_EXT_SET_DATA::ID),
33669            PARAM_EXT_VALUE_DATA::NAME => Some(PARAM_EXT_VALUE_DATA::ID),
33670            PARAM_MAP_RC_DATA::NAME => Some(PARAM_MAP_RC_DATA::ID),
33671            PARAM_REQUEST_LIST_DATA::NAME => Some(PARAM_REQUEST_LIST_DATA::ID),
33672            PARAM_REQUEST_READ_DATA::NAME => Some(PARAM_REQUEST_READ_DATA::ID),
33673            PARAM_SET_DATA::NAME => Some(PARAM_SET_DATA::ID),
33674            PARAM_VALUE_DATA::NAME => Some(PARAM_VALUE_DATA::ID),
33675            PING_DATA::NAME => Some(PING_DATA::ID),
33676            PLAY_TUNE_DATA::NAME => Some(PLAY_TUNE_DATA::ID),
33677            PLAY_TUNE_V2_DATA::NAME => Some(PLAY_TUNE_V2_DATA::ID),
33678            POSITION_TARGET_GLOBAL_INT_DATA::NAME => Some(POSITION_TARGET_GLOBAL_INT_DATA::ID),
33679            POSITION_TARGET_LOCAL_NED_DATA::NAME => Some(POSITION_TARGET_LOCAL_NED_DATA::ID),
33680            POWER_STATUS_DATA::NAME => Some(POWER_STATUS_DATA::ID),
33681            PROTOCOL_VERSION_DATA::NAME => Some(PROTOCOL_VERSION_DATA::ID),
33682            RADIO_STATUS_DATA::NAME => Some(RADIO_STATUS_DATA::ID),
33683            RAW_IMU_DATA::NAME => Some(RAW_IMU_DATA::ID),
33684            RAW_PRESSURE_DATA::NAME => Some(RAW_PRESSURE_DATA::ID),
33685            RAW_RPM_DATA::NAME => Some(RAW_RPM_DATA::ID),
33686            RC_CHANNELS_DATA::NAME => Some(RC_CHANNELS_DATA::ID),
33687            RC_CHANNELS_OVERRIDE_DATA::NAME => Some(RC_CHANNELS_OVERRIDE_DATA::ID),
33688            RC_CHANNELS_RAW_DATA::NAME => Some(RC_CHANNELS_RAW_DATA::ID),
33689            RC_CHANNELS_SCALED_DATA::NAME => Some(RC_CHANNELS_SCALED_DATA::ID),
33690            REQUEST_DATA_STREAM_DATA::NAME => Some(REQUEST_DATA_STREAM_DATA::ID),
33691            REQUEST_EVENT_DATA::NAME => Some(REQUEST_EVENT_DATA::ID),
33692            RESOURCE_REQUEST_DATA::NAME => Some(RESOURCE_REQUEST_DATA::ID),
33693            RESPONSE_EVENT_ERROR_DATA::NAME => Some(RESPONSE_EVENT_ERROR_DATA::ID),
33694            SAFETY_ALLOWED_AREA_DATA::NAME => Some(SAFETY_ALLOWED_AREA_DATA::ID),
33695            SAFETY_SET_ALLOWED_AREA_DATA::NAME => Some(SAFETY_SET_ALLOWED_AREA_DATA::ID),
33696            SCALED_IMU_DATA::NAME => Some(SCALED_IMU_DATA::ID),
33697            SCALED_IMU2_DATA::NAME => Some(SCALED_IMU2_DATA::ID),
33698            SCALED_IMU3_DATA::NAME => Some(SCALED_IMU3_DATA::ID),
33699            SCALED_PRESSURE_DATA::NAME => Some(SCALED_PRESSURE_DATA::ID),
33700            SCALED_PRESSURE2_DATA::NAME => Some(SCALED_PRESSURE2_DATA::ID),
33701            SCALED_PRESSURE3_DATA::NAME => Some(SCALED_PRESSURE3_DATA::ID),
33702            SERIAL_CONTROL_DATA::NAME => Some(SERIAL_CONTROL_DATA::ID),
33703            SERVO_OUTPUT_RAW_DATA::NAME => Some(SERVO_OUTPUT_RAW_DATA::ID),
33704            SETUP_SIGNING_DATA::NAME => Some(SETUP_SIGNING_DATA::ID),
33705            SET_ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(SET_ACTUATOR_CONTROL_TARGET_DATA::ID),
33706            SET_ATTITUDE_TARGET_DATA::NAME => Some(SET_ATTITUDE_TARGET_DATA::ID),
33707            SET_GPS_GLOBAL_ORIGIN_DATA::NAME => Some(SET_GPS_GLOBAL_ORIGIN_DATA::ID),
33708            SET_HOME_POSITION_DATA::NAME => Some(SET_HOME_POSITION_DATA::ID),
33709            SET_MODE_DATA::NAME => Some(SET_MODE_DATA::ID),
33710            SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME => {
33711                Some(SET_POSITION_TARGET_GLOBAL_INT_DATA::ID)
33712            }
33713            SET_POSITION_TARGET_LOCAL_NED_DATA::NAME => {
33714                Some(SET_POSITION_TARGET_LOCAL_NED_DATA::ID)
33715            }
33716            SIM_STATE_DATA::NAME => Some(SIM_STATE_DATA::ID),
33717            SMART_BATTERY_INFO_DATA::NAME => Some(SMART_BATTERY_INFO_DATA::ID),
33718            STATUSTEXT_DATA::NAME => Some(STATUSTEXT_DATA::ID),
33719            STORAGE_INFORMATION_DATA::NAME => Some(STORAGE_INFORMATION_DATA::ID),
33720            SUPPORTED_TUNES_DATA::NAME => Some(SUPPORTED_TUNES_DATA::ID),
33721            SYSTEM_TIME_DATA::NAME => Some(SYSTEM_TIME_DATA::ID),
33722            SYS_STATUS_DATA::NAME => Some(SYS_STATUS_DATA::ID),
33723            TERRAIN_CHECK_DATA::NAME => Some(TERRAIN_CHECK_DATA::ID),
33724            TERRAIN_DATA_DATA::NAME => Some(TERRAIN_DATA_DATA::ID),
33725            TERRAIN_REPORT_DATA::NAME => Some(TERRAIN_REPORT_DATA::ID),
33726            TERRAIN_REQUEST_DATA::NAME => Some(TERRAIN_REQUEST_DATA::ID),
33727            TIMESYNC_DATA::NAME => Some(TIMESYNC_DATA::ID),
33728            TIME_ESTIMATE_TO_TARGET_DATA::NAME => Some(TIME_ESTIMATE_TO_TARGET_DATA::ID),
33729            TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME => {
33730                Some(TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID)
33731            }
33732            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME => {
33733                Some(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID)
33734            }
33735            TUNNEL_DATA::NAME => Some(TUNNEL_DATA::ID),
33736            UAVCAN_NODE_INFO_DATA::NAME => Some(UAVCAN_NODE_INFO_DATA::ID),
33737            UAVCAN_NODE_STATUS_DATA::NAME => Some(UAVCAN_NODE_STATUS_DATA::ID),
33738            UAVIONIX_ADSB_GET_DATA::NAME => Some(UAVIONIX_ADSB_GET_DATA::ID),
33739            UAVIONIX_ADSB_OUT_CFG_DATA::NAME => Some(UAVIONIX_ADSB_OUT_CFG_DATA::ID),
33740            UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA::NAME => {
33741                Some(UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA::ID)
33742            }
33743            UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA::NAME => {
33744                Some(UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA::ID)
33745            }
33746            UAVIONIX_ADSB_OUT_CONTROL_DATA::NAME => Some(UAVIONIX_ADSB_OUT_CONTROL_DATA::ID),
33747            UAVIONIX_ADSB_OUT_DYNAMIC_DATA::NAME => Some(UAVIONIX_ADSB_OUT_DYNAMIC_DATA::ID),
33748            UAVIONIX_ADSB_OUT_STATUS_DATA::NAME => Some(UAVIONIX_ADSB_OUT_STATUS_DATA::ID),
33749            UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA::NAME => {
33750                Some(UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA::ID)
33751            }
33752            UTM_GLOBAL_POSITION_DATA::NAME => Some(UTM_GLOBAL_POSITION_DATA::ID),
33753            V2_EXTENSION_DATA::NAME => Some(V2_EXTENSION_DATA::ID),
33754            VFR_HUD_DATA::NAME => Some(VFR_HUD_DATA::ID),
33755            VIBRATION_DATA::NAME => Some(VIBRATION_DATA::ID),
33756            VICON_POSITION_ESTIMATE_DATA::NAME => Some(VICON_POSITION_ESTIMATE_DATA::ID),
33757            VIDEO_STREAM_INFORMATION_DATA::NAME => Some(VIDEO_STREAM_INFORMATION_DATA::ID),
33758            VIDEO_STREAM_STATUS_DATA::NAME => Some(VIDEO_STREAM_STATUS_DATA::ID),
33759            VISION_POSITION_ESTIMATE_DATA::NAME => Some(VISION_POSITION_ESTIMATE_DATA::ID),
33760            VISION_SPEED_ESTIMATE_DATA::NAME => Some(VISION_SPEED_ESTIMATE_DATA::ID),
33761            WHEEL_DISTANCE_DATA::NAME => Some(WHEEL_DISTANCE_DATA::ID),
33762            WIFI_CONFIG_AP_DATA::NAME => Some(WIFI_CONFIG_AP_DATA::ID),
33763            WINCH_STATUS_DATA::NAME => Some(WINCH_STATUS_DATA::ID),
33764            WIND_COV_DATA::NAME => Some(WIND_COV_DATA::ID),
33765            _ => None,
33766        }
33767    }
33768    fn default_message_from_id(id: u32) -> Option<Self> {
33769        match id {
33770            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
33771                ACTUATOR_CONTROL_TARGET_DATA::default(),
33772            )),
33773            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
33774                ACTUATOR_OUTPUT_STATUS_DATA::default(),
33775            )),
33776            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::default())),
33777            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::default())),
33778            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::default())),
33779            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::default())),
33780            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
33781                ATTITUDE_QUATERNION_DATA::default(),
33782            )),
33783            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
33784                ATTITUDE_QUATERNION_COV_DATA::default(),
33785            )),
33786            ATTITUDE_TARGET_DATA::ID => {
33787                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::default()))
33788            }
33789            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::default())),
33790            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::default())),
33791            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
33792                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
33793                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::default(),
33794                ))
33795            }
33796            AUTOPILOT_VERSION_DATA::ID => {
33797                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::default()))
33798            }
33799            AVAILABLE_MODES_DATA::ID => {
33800                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::default()))
33801            }
33802            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
33803                AVAILABLE_MODES_MONITOR_DATA::default(),
33804            )),
33805            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::default())),
33806            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::default())),
33807            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::default())),
33808            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
33809                CAMERA_CAPTURE_STATUS_DATA::default(),
33810            )),
33811            CAMERA_FOV_STATUS_DATA::ID => {
33812                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::default()))
33813            }
33814            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
33815                CAMERA_IMAGE_CAPTURED_DATA::default(),
33816            )),
33817            CAMERA_INFORMATION_DATA::ID => {
33818                Some(Self::CAMERA_INFORMATION(CAMERA_INFORMATION_DATA::default()))
33819            }
33820            CAMERA_SETTINGS_DATA::ID => {
33821                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::default()))
33822            }
33823            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
33824                CAMERA_THERMAL_RANGE_DATA::default(),
33825            )),
33826            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
33827                CAMERA_TRACKING_GEO_STATUS_DATA::default(),
33828            )),
33829            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
33830                CAMERA_TRACKING_IMAGE_STATUS_DATA::default(),
33831            )),
33832            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::default())),
33833            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::default())),
33834            CAN_FILTER_MODIFY_DATA::ID => {
33835                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::default()))
33836            }
33837            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::default())),
33838            CELLULAR_CONFIG_DATA::ID => {
33839                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::default()))
33840            }
33841            CELLULAR_STATUS_DATA::ID => {
33842                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::default()))
33843            }
33844            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
33845                CHANGE_OPERATOR_CONTROL_DATA::default(),
33846            )),
33847            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
33848                CHANGE_OPERATOR_CONTROL_ACK_DATA::default(),
33849            )),
33850            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::default())),
33851            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::default())),
33852            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::default())),
33853            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::default())),
33854            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::default())),
33855            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
33856                COMPONENT_INFORMATION_DATA::default(),
33857            )),
33858            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
33859                COMPONENT_INFORMATION_BASIC_DATA::default(),
33860            )),
33861            COMPONENT_METADATA_DATA::ID => {
33862                Some(Self::COMPONENT_METADATA(COMPONENT_METADATA_DATA::default()))
33863            }
33864            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
33865                CONTROL_SYSTEM_STATE_DATA::default(),
33866            )),
33867            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
33868                CURRENT_EVENT_SEQUENCE_DATA::default(),
33869            )),
33870            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::default())),
33871            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::default())),
33872            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
33873                DATA_TRANSMISSION_HANDSHAKE_DATA::default(),
33874            )),
33875            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::default())),
33876            DEBUG_FLOAT_ARRAY_DATA::ID => {
33877                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::default()))
33878            }
33879            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::default())),
33880            DISTANCE_SENSOR_DATA::ID => {
33881                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::default()))
33882            }
33883            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::default())),
33884            ENCAPSULATED_DATA_DATA::ID => {
33885                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::default()))
33886            }
33887            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::default())),
33888            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::default())),
33889            ESTIMATOR_STATUS_DATA::ID => {
33890                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::default()))
33891            }
33892            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::default())),
33893            EXTENDED_SYS_STATE_DATA::ID => {
33894                Some(Self::EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA::default()))
33895            }
33896            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::default())),
33897            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
33898                FILE_TRANSFER_PROTOCOL_DATA::default(),
33899            )),
33900            FLIGHT_INFORMATION_DATA::ID => {
33901                Some(Self::FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA::default()))
33902            }
33903            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::default())),
33904            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::default())),
33905            GENERATOR_STATUS_DATA::ID => {
33906                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::default()))
33907            }
33908            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
33909                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::default(),
33910            )),
33911            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
33912                GIMBAL_DEVICE_INFORMATION_DATA::default(),
33913            )),
33914            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
33915                GIMBAL_DEVICE_SET_ATTITUDE_DATA::default(),
33916            )),
33917            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
33918                GIMBAL_MANAGER_INFORMATION_DATA::default(),
33919            )),
33920            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
33921                GIMBAL_MANAGER_SET_ATTITUDE_DATA::default(),
33922            )),
33923            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
33924                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
33925                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::default(),
33926                ))
33927            }
33928            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
33929                GIMBAL_MANAGER_SET_PITCHYAW_DATA::default(),
33930            )),
33931            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
33932                GIMBAL_MANAGER_STATUS_DATA::default(),
33933            )),
33934            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
33935                GLOBAL_POSITION_INT_DATA::default(),
33936            )),
33937            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
33938                GLOBAL_POSITION_INT_COV_DATA::default(),
33939            )),
33940            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
33941                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
33942                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::default(),
33943                ))
33944            }
33945            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::default())),
33946            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::default())),
33947            GPS_GLOBAL_ORIGIN_DATA::ID => {
33948                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::default()))
33949            }
33950            GPS_INJECT_DATA_DATA::ID => {
33951                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::default()))
33952            }
33953            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::default())),
33954            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::default())),
33955            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::default())),
33956            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::default())),
33957            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::default())),
33958            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::default())),
33959            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::default())),
33960            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::default())),
33961            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::default())),
33962            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
33963                HIL_ACTUATOR_CONTROLS_DATA::default(),
33964            )),
33965            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::default())),
33966            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::default())),
33967            HIL_OPTICAL_FLOW_DATA::ID => {
33968                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::default()))
33969            }
33970            HIL_RC_INPUTS_RAW_DATA::ID => {
33971                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::default()))
33972            }
33973            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::default())),
33974            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::default())),
33975            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
33976                HIL_STATE_QUATERNION_DATA::default(),
33977            )),
33978            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::default())),
33979            HYGROMETER_SENSOR_DATA::ID => {
33980                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::default()))
33981            }
33982            ILLUMINATOR_STATUS_DATA::ID => {
33983                Some(Self::ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA::default()))
33984            }
33985            ISBD_LINK_STATUS_DATA::ID => {
33986                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::default()))
33987            }
33988            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::default())),
33989            LINK_NODE_STATUS_DATA::ID => {
33990                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::default()))
33991            }
33992            LOCAL_POSITION_NED_DATA::ID => {
33993                Some(Self::LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA::default()))
33994            }
33995            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
33996                LOCAL_POSITION_NED_COV_DATA::default(),
33997            )),
33998            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
33999                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
34000                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::default(),
34001                ))
34002            }
34003            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::default())),
34004            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::default())),
34005            LOGGING_DATA_ACKED_DATA::ID => {
34006                Some(Self::LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA::default()))
34007            }
34008            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::default())),
34009            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::default())),
34010            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::default())),
34011            LOG_REQUEST_DATA_DATA::ID => {
34012                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::default()))
34013            }
34014            LOG_REQUEST_END_DATA::ID => {
34015                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::default()))
34016            }
34017            LOG_REQUEST_LIST_DATA::ID => {
34018                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::default()))
34019            }
34020            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::default())),
34021            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::default())),
34022            MANUAL_SETPOINT_DATA::ID => {
34023                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::default()))
34024            }
34025            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::default())),
34026            MESSAGE_INTERVAL_DATA::ID => {
34027                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::default()))
34028            }
34029            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::default())),
34030            MISSION_CLEAR_ALL_DATA::ID => {
34031                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::default()))
34032            }
34033            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::default())),
34034            MISSION_CURRENT_DATA::ID => {
34035                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::default()))
34036            }
34037            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::default())),
34038            MISSION_ITEM_INT_DATA::ID => {
34039                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::default()))
34040            }
34041            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
34042                MISSION_ITEM_REACHED_DATA::default(),
34043            )),
34044            MISSION_REQUEST_DATA::ID => {
34045                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::default()))
34046            }
34047            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
34048                MISSION_REQUEST_INT_DATA::default(),
34049            )),
34050            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
34051                MISSION_REQUEST_LIST_DATA::default(),
34052            )),
34053            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
34054                MISSION_REQUEST_PARTIAL_LIST_DATA::default(),
34055            )),
34056            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
34057                MISSION_SET_CURRENT_DATA::default(),
34058            )),
34059            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
34060                MISSION_WRITE_PARTIAL_LIST_DATA::default(),
34061            )),
34062            MOUNT_ORIENTATION_DATA::ID => {
34063                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::default()))
34064            }
34065            NAMED_VALUE_FLOAT_DATA::ID => {
34066                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::default()))
34067            }
34068            NAMED_VALUE_INT_DATA::ID => {
34069                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::default()))
34070            }
34071            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
34072                NAV_CONTROLLER_OUTPUT_DATA::default(),
34073            )),
34074            OBSTACLE_DISTANCE_DATA::ID => {
34075                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::default()))
34076            }
34077            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::default())),
34078            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
34079                ONBOARD_COMPUTER_STATUS_DATA::default(),
34080            )),
34081            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
34082                OPEN_DRONE_ID_ARM_STATUS_DATA::default(),
34083            )),
34084            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
34085                OPEN_DRONE_ID_AUTHENTICATION_DATA::default(),
34086            )),
34087            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
34088                OPEN_DRONE_ID_BASIC_ID_DATA::default(),
34089            )),
34090            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
34091                OPEN_DRONE_ID_LOCATION_DATA::default(),
34092            )),
34093            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
34094                OPEN_DRONE_ID_MESSAGE_PACK_DATA::default(),
34095            )),
34096            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
34097                OPEN_DRONE_ID_OPERATOR_ID_DATA::default(),
34098            )),
34099            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
34100                OPEN_DRONE_ID_SELF_ID_DATA::default(),
34101            )),
34102            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
34103                OPEN_DRONE_ID_SYSTEM_DATA::default(),
34104            )),
34105            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
34106                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::default(),
34107            )),
34108            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::default())),
34109            OPTICAL_FLOW_RAD_DATA::ID => {
34110                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::default()))
34111            }
34112            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
34113                ORBIT_EXECUTION_STATUS_DATA::default(),
34114            )),
34115            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::default())),
34116            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
34117                PARAM_EXT_REQUEST_LIST_DATA::default(),
34118            )),
34119            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
34120                PARAM_EXT_REQUEST_READ_DATA::default(),
34121            )),
34122            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::default())),
34123            PARAM_EXT_VALUE_DATA::ID => {
34124                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::default()))
34125            }
34126            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::default())),
34127            PARAM_REQUEST_LIST_DATA::ID => {
34128                Some(Self::PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA::default()))
34129            }
34130            PARAM_REQUEST_READ_DATA::ID => {
34131                Some(Self::PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA::default()))
34132            }
34133            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::default())),
34134            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::default())),
34135            PING_DATA::ID => Some(Self::PING(PING_DATA::default())),
34136            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::default())),
34137            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::default())),
34138            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
34139                POSITION_TARGET_GLOBAL_INT_DATA::default(),
34140            )),
34141            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
34142                POSITION_TARGET_LOCAL_NED_DATA::default(),
34143            )),
34144            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::default())),
34145            PROTOCOL_VERSION_DATA::ID => {
34146                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::default()))
34147            }
34148            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::default())),
34149            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::default())),
34150            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::default())),
34151            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::default())),
34152            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::default())),
34153            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
34154                RC_CHANNELS_OVERRIDE_DATA::default(),
34155            )),
34156            RC_CHANNELS_RAW_DATA::ID => {
34157                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::default()))
34158            }
34159            RC_CHANNELS_SCALED_DATA::ID => {
34160                Some(Self::RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA::default()))
34161            }
34162            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
34163                REQUEST_DATA_STREAM_DATA::default(),
34164            )),
34165            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::default())),
34166            RESOURCE_REQUEST_DATA::ID => {
34167                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::default()))
34168            }
34169            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
34170                RESPONSE_EVENT_ERROR_DATA::default(),
34171            )),
34172            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
34173                SAFETY_ALLOWED_AREA_DATA::default(),
34174            )),
34175            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
34176                SAFETY_SET_ALLOWED_AREA_DATA::default(),
34177            )),
34178            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::default())),
34179            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::default())),
34180            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::default())),
34181            SCALED_PRESSURE_DATA::ID => {
34182                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::default()))
34183            }
34184            SCALED_PRESSURE2_DATA::ID => {
34185                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::default()))
34186            }
34187            SCALED_PRESSURE3_DATA::ID => {
34188                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::default()))
34189            }
34190            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::default())),
34191            SERVO_OUTPUT_RAW_DATA::ID => {
34192                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::default()))
34193            }
34194            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::default())),
34195            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
34196                SET_ACTUATOR_CONTROL_TARGET_DATA::default(),
34197            )),
34198            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
34199                SET_ATTITUDE_TARGET_DATA::default(),
34200            )),
34201            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
34202                SET_GPS_GLOBAL_ORIGIN_DATA::default(),
34203            )),
34204            SET_HOME_POSITION_DATA::ID => {
34205                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::default()))
34206            }
34207            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::default())),
34208            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
34209                SET_POSITION_TARGET_GLOBAL_INT_DATA::default(),
34210            )),
34211            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
34212                SET_POSITION_TARGET_LOCAL_NED_DATA::default(),
34213            )),
34214            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::default())),
34215            SMART_BATTERY_INFO_DATA::ID => {
34216                Some(Self::SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA::default()))
34217            }
34218            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::default())),
34219            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
34220                STORAGE_INFORMATION_DATA::default(),
34221            )),
34222            SUPPORTED_TUNES_DATA::ID => {
34223                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::default()))
34224            }
34225            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::default())),
34226            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::default())),
34227            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::default())),
34228            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::default())),
34229            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::default())),
34230            TERRAIN_REQUEST_DATA::ID => {
34231                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::default()))
34232            }
34233            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::default())),
34234            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
34235                TIME_ESTIMATE_TO_TARGET_DATA::default(),
34236            )),
34237            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
34238                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
34239                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::default(),
34240                ))
34241            }
34242            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
34243                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
34244                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::default(),
34245                ))
34246            }
34247            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::default())),
34248            UAVCAN_NODE_INFO_DATA::ID => {
34249                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::default()))
34250            }
34251            UAVCAN_NODE_STATUS_DATA::ID => {
34252                Some(Self::UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA::default()))
34253            }
34254            UAVIONIX_ADSB_GET_DATA::ID => {
34255                Some(Self::UAVIONIX_ADSB_GET(UAVIONIX_ADSB_GET_DATA::default()))
34256            }
34257            UAVIONIX_ADSB_OUT_CFG_DATA::ID => Some(Self::UAVIONIX_ADSB_OUT_CFG(
34258                UAVIONIX_ADSB_OUT_CFG_DATA::default(),
34259            )),
34260            UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA::ID => Some(Self::UAVIONIX_ADSB_OUT_CFG_FLIGHTID(
34261                UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA::default(),
34262            )),
34263            UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA::ID => {
34264                Some(Self::UAVIONIX_ADSB_OUT_CFG_REGISTRATION(
34265                    UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA::default(),
34266                ))
34267            }
34268            UAVIONIX_ADSB_OUT_CONTROL_DATA::ID => Some(Self::UAVIONIX_ADSB_OUT_CONTROL(
34269                UAVIONIX_ADSB_OUT_CONTROL_DATA::default(),
34270            )),
34271            UAVIONIX_ADSB_OUT_DYNAMIC_DATA::ID => Some(Self::UAVIONIX_ADSB_OUT_DYNAMIC(
34272                UAVIONIX_ADSB_OUT_DYNAMIC_DATA::default(),
34273            )),
34274            UAVIONIX_ADSB_OUT_STATUS_DATA::ID => Some(Self::UAVIONIX_ADSB_OUT_STATUS(
34275                UAVIONIX_ADSB_OUT_STATUS_DATA::default(),
34276            )),
34277            UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA::ID => {
34278                Some(Self::UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT(
34279                    UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA::default(),
34280                ))
34281            }
34282            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
34283                UTM_GLOBAL_POSITION_DATA::default(),
34284            )),
34285            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::default())),
34286            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::default())),
34287            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::default())),
34288            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
34289                VICON_POSITION_ESTIMATE_DATA::default(),
34290            )),
34291            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
34292                VIDEO_STREAM_INFORMATION_DATA::default(),
34293            )),
34294            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
34295                VIDEO_STREAM_STATUS_DATA::default(),
34296            )),
34297            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
34298                VISION_POSITION_ESTIMATE_DATA::default(),
34299            )),
34300            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
34301                VISION_SPEED_ESTIMATE_DATA::default(),
34302            )),
34303            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::default())),
34304            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::default())),
34305            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::default())),
34306            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::default())),
34307            _ => None,
34308        }
34309    }
34310    #[cfg(feature = "arbitrary")]
34311    fn random_message_from_id<R: rand::RngCore>(id: u32, rng: &mut R) -> Option<Self> {
34312        match id {
34313            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
34314                ACTUATOR_CONTROL_TARGET_DATA::random(rng),
34315            )),
34316            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
34317                ACTUATOR_OUTPUT_STATUS_DATA::random(rng),
34318            )),
34319            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::random(rng))),
34320            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::random(rng))),
34321            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::random(rng))),
34322            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::random(rng))),
34323            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
34324                ATTITUDE_QUATERNION_DATA::random(rng),
34325            )),
34326            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
34327                ATTITUDE_QUATERNION_COV_DATA::random(rng),
34328            )),
34329            ATTITUDE_TARGET_DATA::ID => {
34330                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::random(rng)))
34331            }
34332            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::random(rng))),
34333            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::random(rng))),
34334            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
34335                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
34336                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::random(rng),
34337                ))
34338            }
34339            AUTOPILOT_VERSION_DATA::ID => {
34340                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::random(rng)))
34341            }
34342            AVAILABLE_MODES_DATA::ID => {
34343                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::random(rng)))
34344            }
34345            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
34346                AVAILABLE_MODES_MONITOR_DATA::random(rng),
34347            )),
34348            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::random(rng))),
34349            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::random(rng))),
34350            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::random(rng))),
34351            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
34352                CAMERA_CAPTURE_STATUS_DATA::random(rng),
34353            )),
34354            CAMERA_FOV_STATUS_DATA::ID => {
34355                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::random(rng)))
34356            }
34357            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
34358                CAMERA_IMAGE_CAPTURED_DATA::random(rng),
34359            )),
34360            CAMERA_INFORMATION_DATA::ID => Some(Self::CAMERA_INFORMATION(
34361                CAMERA_INFORMATION_DATA::random(rng),
34362            )),
34363            CAMERA_SETTINGS_DATA::ID => {
34364                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::random(rng)))
34365            }
34366            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
34367                CAMERA_THERMAL_RANGE_DATA::random(rng),
34368            )),
34369            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
34370                CAMERA_TRACKING_GEO_STATUS_DATA::random(rng),
34371            )),
34372            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
34373                CAMERA_TRACKING_IMAGE_STATUS_DATA::random(rng),
34374            )),
34375            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::random(rng))),
34376            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::random(rng))),
34377            CAN_FILTER_MODIFY_DATA::ID => {
34378                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::random(rng)))
34379            }
34380            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::random(rng))),
34381            CELLULAR_CONFIG_DATA::ID => {
34382                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::random(rng)))
34383            }
34384            CELLULAR_STATUS_DATA::ID => {
34385                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::random(rng)))
34386            }
34387            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
34388                CHANGE_OPERATOR_CONTROL_DATA::random(rng),
34389            )),
34390            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
34391                CHANGE_OPERATOR_CONTROL_ACK_DATA::random(rng),
34392            )),
34393            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::random(rng))),
34394            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::random(rng))),
34395            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::random(rng))),
34396            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::random(rng))),
34397            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::random(rng))),
34398            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
34399                COMPONENT_INFORMATION_DATA::random(rng),
34400            )),
34401            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
34402                COMPONENT_INFORMATION_BASIC_DATA::random(rng),
34403            )),
34404            COMPONENT_METADATA_DATA::ID => Some(Self::COMPONENT_METADATA(
34405                COMPONENT_METADATA_DATA::random(rng),
34406            )),
34407            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
34408                CONTROL_SYSTEM_STATE_DATA::random(rng),
34409            )),
34410            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
34411                CURRENT_EVENT_SEQUENCE_DATA::random(rng),
34412            )),
34413            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::random(rng))),
34414            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::random(rng))),
34415            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
34416                DATA_TRANSMISSION_HANDSHAKE_DATA::random(rng),
34417            )),
34418            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::random(rng))),
34419            DEBUG_FLOAT_ARRAY_DATA::ID => {
34420                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::random(rng)))
34421            }
34422            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::random(rng))),
34423            DISTANCE_SENSOR_DATA::ID => {
34424                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::random(rng)))
34425            }
34426            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::random(rng))),
34427            ENCAPSULATED_DATA_DATA::ID => {
34428                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::random(rng)))
34429            }
34430            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::random(rng))),
34431            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::random(rng))),
34432            ESTIMATOR_STATUS_DATA::ID => {
34433                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::random(rng)))
34434            }
34435            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::random(rng))),
34436            EXTENDED_SYS_STATE_DATA::ID => Some(Self::EXTENDED_SYS_STATE(
34437                EXTENDED_SYS_STATE_DATA::random(rng),
34438            )),
34439            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::random(rng))),
34440            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
34441                FILE_TRANSFER_PROTOCOL_DATA::random(rng),
34442            )),
34443            FLIGHT_INFORMATION_DATA::ID => Some(Self::FLIGHT_INFORMATION(
34444                FLIGHT_INFORMATION_DATA::random(rng),
34445            )),
34446            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::random(rng))),
34447            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::random(rng))),
34448            GENERATOR_STATUS_DATA::ID => {
34449                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::random(rng)))
34450            }
34451            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
34452                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::random(rng),
34453            )),
34454            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
34455                GIMBAL_DEVICE_INFORMATION_DATA::random(rng),
34456            )),
34457            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
34458                GIMBAL_DEVICE_SET_ATTITUDE_DATA::random(rng),
34459            )),
34460            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
34461                GIMBAL_MANAGER_INFORMATION_DATA::random(rng),
34462            )),
34463            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
34464                GIMBAL_MANAGER_SET_ATTITUDE_DATA::random(rng),
34465            )),
34466            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
34467                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
34468                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::random(rng),
34469                ))
34470            }
34471            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
34472                GIMBAL_MANAGER_SET_PITCHYAW_DATA::random(rng),
34473            )),
34474            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
34475                GIMBAL_MANAGER_STATUS_DATA::random(rng),
34476            )),
34477            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
34478                GLOBAL_POSITION_INT_DATA::random(rng),
34479            )),
34480            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
34481                GLOBAL_POSITION_INT_COV_DATA::random(rng),
34482            )),
34483            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
34484                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
34485                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::random(rng),
34486                ))
34487            }
34488            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::random(rng))),
34489            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::random(rng))),
34490            GPS_GLOBAL_ORIGIN_DATA::ID => {
34491                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::random(rng)))
34492            }
34493            GPS_INJECT_DATA_DATA::ID => {
34494                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::random(rng)))
34495            }
34496            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::random(rng))),
34497            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::random(rng))),
34498            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::random(rng))),
34499            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::random(rng))),
34500            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::random(rng))),
34501            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::random(rng))),
34502            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::random(rng))),
34503            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::random(rng))),
34504            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::random(rng))),
34505            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
34506                HIL_ACTUATOR_CONTROLS_DATA::random(rng),
34507            )),
34508            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::random(rng))),
34509            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::random(rng))),
34510            HIL_OPTICAL_FLOW_DATA::ID => {
34511                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::random(rng)))
34512            }
34513            HIL_RC_INPUTS_RAW_DATA::ID => {
34514                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::random(rng)))
34515            }
34516            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::random(rng))),
34517            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::random(rng))),
34518            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
34519                HIL_STATE_QUATERNION_DATA::random(rng),
34520            )),
34521            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::random(rng))),
34522            HYGROMETER_SENSOR_DATA::ID => {
34523                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::random(rng)))
34524            }
34525            ILLUMINATOR_STATUS_DATA::ID => Some(Self::ILLUMINATOR_STATUS(
34526                ILLUMINATOR_STATUS_DATA::random(rng),
34527            )),
34528            ISBD_LINK_STATUS_DATA::ID => {
34529                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::random(rng)))
34530            }
34531            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::random(rng))),
34532            LINK_NODE_STATUS_DATA::ID => {
34533                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::random(rng)))
34534            }
34535            LOCAL_POSITION_NED_DATA::ID => Some(Self::LOCAL_POSITION_NED(
34536                LOCAL_POSITION_NED_DATA::random(rng),
34537            )),
34538            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
34539                LOCAL_POSITION_NED_COV_DATA::random(rng),
34540            )),
34541            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
34542                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
34543                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::random(rng),
34544                ))
34545            }
34546            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::random(rng))),
34547            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::random(rng))),
34548            LOGGING_DATA_ACKED_DATA::ID => Some(Self::LOGGING_DATA_ACKED(
34549                LOGGING_DATA_ACKED_DATA::random(rng),
34550            )),
34551            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::random(rng))),
34552            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::random(rng))),
34553            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::random(rng))),
34554            LOG_REQUEST_DATA_DATA::ID => {
34555                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::random(rng)))
34556            }
34557            LOG_REQUEST_END_DATA::ID => {
34558                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::random(rng)))
34559            }
34560            LOG_REQUEST_LIST_DATA::ID => {
34561                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::random(rng)))
34562            }
34563            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::random(rng))),
34564            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::random(rng))),
34565            MANUAL_SETPOINT_DATA::ID => {
34566                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::random(rng)))
34567            }
34568            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::random(rng))),
34569            MESSAGE_INTERVAL_DATA::ID => {
34570                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::random(rng)))
34571            }
34572            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::random(rng))),
34573            MISSION_CLEAR_ALL_DATA::ID => {
34574                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::random(rng)))
34575            }
34576            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::random(rng))),
34577            MISSION_CURRENT_DATA::ID => {
34578                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::random(rng)))
34579            }
34580            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::random(rng))),
34581            MISSION_ITEM_INT_DATA::ID => {
34582                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::random(rng)))
34583            }
34584            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
34585                MISSION_ITEM_REACHED_DATA::random(rng),
34586            )),
34587            MISSION_REQUEST_DATA::ID => {
34588                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::random(rng)))
34589            }
34590            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
34591                MISSION_REQUEST_INT_DATA::random(rng),
34592            )),
34593            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
34594                MISSION_REQUEST_LIST_DATA::random(rng),
34595            )),
34596            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
34597                MISSION_REQUEST_PARTIAL_LIST_DATA::random(rng),
34598            )),
34599            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
34600                MISSION_SET_CURRENT_DATA::random(rng),
34601            )),
34602            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
34603                MISSION_WRITE_PARTIAL_LIST_DATA::random(rng),
34604            )),
34605            MOUNT_ORIENTATION_DATA::ID => {
34606                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::random(rng)))
34607            }
34608            NAMED_VALUE_FLOAT_DATA::ID => {
34609                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::random(rng)))
34610            }
34611            NAMED_VALUE_INT_DATA::ID => {
34612                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::random(rng)))
34613            }
34614            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
34615                NAV_CONTROLLER_OUTPUT_DATA::random(rng),
34616            )),
34617            OBSTACLE_DISTANCE_DATA::ID => {
34618                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::random(rng)))
34619            }
34620            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::random(rng))),
34621            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
34622                ONBOARD_COMPUTER_STATUS_DATA::random(rng),
34623            )),
34624            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
34625                OPEN_DRONE_ID_ARM_STATUS_DATA::random(rng),
34626            )),
34627            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
34628                OPEN_DRONE_ID_AUTHENTICATION_DATA::random(rng),
34629            )),
34630            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
34631                OPEN_DRONE_ID_BASIC_ID_DATA::random(rng),
34632            )),
34633            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
34634                OPEN_DRONE_ID_LOCATION_DATA::random(rng),
34635            )),
34636            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
34637                OPEN_DRONE_ID_MESSAGE_PACK_DATA::random(rng),
34638            )),
34639            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
34640                OPEN_DRONE_ID_OPERATOR_ID_DATA::random(rng),
34641            )),
34642            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
34643                OPEN_DRONE_ID_SELF_ID_DATA::random(rng),
34644            )),
34645            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
34646                OPEN_DRONE_ID_SYSTEM_DATA::random(rng),
34647            )),
34648            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
34649                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::random(rng),
34650            )),
34651            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::random(rng))),
34652            OPTICAL_FLOW_RAD_DATA::ID => {
34653                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::random(rng)))
34654            }
34655            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
34656                ORBIT_EXECUTION_STATUS_DATA::random(rng),
34657            )),
34658            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::random(rng))),
34659            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
34660                PARAM_EXT_REQUEST_LIST_DATA::random(rng),
34661            )),
34662            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
34663                PARAM_EXT_REQUEST_READ_DATA::random(rng),
34664            )),
34665            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::random(rng))),
34666            PARAM_EXT_VALUE_DATA::ID => {
34667                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::random(rng)))
34668            }
34669            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::random(rng))),
34670            PARAM_REQUEST_LIST_DATA::ID => Some(Self::PARAM_REQUEST_LIST(
34671                PARAM_REQUEST_LIST_DATA::random(rng),
34672            )),
34673            PARAM_REQUEST_READ_DATA::ID => Some(Self::PARAM_REQUEST_READ(
34674                PARAM_REQUEST_READ_DATA::random(rng),
34675            )),
34676            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::random(rng))),
34677            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::random(rng))),
34678            PING_DATA::ID => Some(Self::PING(PING_DATA::random(rng))),
34679            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::random(rng))),
34680            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::random(rng))),
34681            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
34682                POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
34683            )),
34684            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
34685                POSITION_TARGET_LOCAL_NED_DATA::random(rng),
34686            )),
34687            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::random(rng))),
34688            PROTOCOL_VERSION_DATA::ID => {
34689                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::random(rng)))
34690            }
34691            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::random(rng))),
34692            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::random(rng))),
34693            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::random(rng))),
34694            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::random(rng))),
34695            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::random(rng))),
34696            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
34697                RC_CHANNELS_OVERRIDE_DATA::random(rng),
34698            )),
34699            RC_CHANNELS_RAW_DATA::ID => {
34700                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::random(rng)))
34701            }
34702            RC_CHANNELS_SCALED_DATA::ID => Some(Self::RC_CHANNELS_SCALED(
34703                RC_CHANNELS_SCALED_DATA::random(rng),
34704            )),
34705            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
34706                REQUEST_DATA_STREAM_DATA::random(rng),
34707            )),
34708            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::random(rng))),
34709            RESOURCE_REQUEST_DATA::ID => {
34710                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::random(rng)))
34711            }
34712            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
34713                RESPONSE_EVENT_ERROR_DATA::random(rng),
34714            )),
34715            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
34716                SAFETY_ALLOWED_AREA_DATA::random(rng),
34717            )),
34718            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
34719                SAFETY_SET_ALLOWED_AREA_DATA::random(rng),
34720            )),
34721            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::random(rng))),
34722            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::random(rng))),
34723            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::random(rng))),
34724            SCALED_PRESSURE_DATA::ID => {
34725                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::random(rng)))
34726            }
34727            SCALED_PRESSURE2_DATA::ID => {
34728                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::random(rng)))
34729            }
34730            SCALED_PRESSURE3_DATA::ID => {
34731                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::random(rng)))
34732            }
34733            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::random(rng))),
34734            SERVO_OUTPUT_RAW_DATA::ID => {
34735                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::random(rng)))
34736            }
34737            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::random(rng))),
34738            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
34739                SET_ACTUATOR_CONTROL_TARGET_DATA::random(rng),
34740            )),
34741            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
34742                SET_ATTITUDE_TARGET_DATA::random(rng),
34743            )),
34744            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
34745                SET_GPS_GLOBAL_ORIGIN_DATA::random(rng),
34746            )),
34747            SET_HOME_POSITION_DATA::ID => {
34748                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::random(rng)))
34749            }
34750            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::random(rng))),
34751            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
34752                SET_POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
34753            )),
34754            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
34755                SET_POSITION_TARGET_LOCAL_NED_DATA::random(rng),
34756            )),
34757            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::random(rng))),
34758            SMART_BATTERY_INFO_DATA::ID => Some(Self::SMART_BATTERY_INFO(
34759                SMART_BATTERY_INFO_DATA::random(rng),
34760            )),
34761            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::random(rng))),
34762            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
34763                STORAGE_INFORMATION_DATA::random(rng),
34764            )),
34765            SUPPORTED_TUNES_DATA::ID => {
34766                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::random(rng)))
34767            }
34768            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::random(rng))),
34769            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::random(rng))),
34770            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::random(rng))),
34771            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::random(rng))),
34772            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::random(rng))),
34773            TERRAIN_REQUEST_DATA::ID => {
34774                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::random(rng)))
34775            }
34776            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::random(rng))),
34777            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
34778                TIME_ESTIMATE_TO_TARGET_DATA::random(rng),
34779            )),
34780            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
34781                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
34782                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::random(rng),
34783                ))
34784            }
34785            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
34786                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
34787                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::random(rng),
34788                ))
34789            }
34790            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::random(rng))),
34791            UAVCAN_NODE_INFO_DATA::ID => {
34792                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::random(rng)))
34793            }
34794            UAVCAN_NODE_STATUS_DATA::ID => Some(Self::UAVCAN_NODE_STATUS(
34795                UAVCAN_NODE_STATUS_DATA::random(rng),
34796            )),
34797            UAVIONIX_ADSB_GET_DATA::ID => {
34798                Some(Self::UAVIONIX_ADSB_GET(UAVIONIX_ADSB_GET_DATA::random(rng)))
34799            }
34800            UAVIONIX_ADSB_OUT_CFG_DATA::ID => Some(Self::UAVIONIX_ADSB_OUT_CFG(
34801                UAVIONIX_ADSB_OUT_CFG_DATA::random(rng),
34802            )),
34803            UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA::ID => Some(Self::UAVIONIX_ADSB_OUT_CFG_FLIGHTID(
34804                UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA::random(rng),
34805            )),
34806            UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA::ID => {
34807                Some(Self::UAVIONIX_ADSB_OUT_CFG_REGISTRATION(
34808                    UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA::random(rng),
34809                ))
34810            }
34811            UAVIONIX_ADSB_OUT_CONTROL_DATA::ID => Some(Self::UAVIONIX_ADSB_OUT_CONTROL(
34812                UAVIONIX_ADSB_OUT_CONTROL_DATA::random(rng),
34813            )),
34814            UAVIONIX_ADSB_OUT_DYNAMIC_DATA::ID => Some(Self::UAVIONIX_ADSB_OUT_DYNAMIC(
34815                UAVIONIX_ADSB_OUT_DYNAMIC_DATA::random(rng),
34816            )),
34817            UAVIONIX_ADSB_OUT_STATUS_DATA::ID => Some(Self::UAVIONIX_ADSB_OUT_STATUS(
34818                UAVIONIX_ADSB_OUT_STATUS_DATA::random(rng),
34819            )),
34820            UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA::ID => {
34821                Some(Self::UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT(
34822                    UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA::random(rng),
34823                ))
34824            }
34825            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
34826                UTM_GLOBAL_POSITION_DATA::random(rng),
34827            )),
34828            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::random(rng))),
34829            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::random(rng))),
34830            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::random(rng))),
34831            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
34832                VICON_POSITION_ESTIMATE_DATA::random(rng),
34833            )),
34834            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
34835                VIDEO_STREAM_INFORMATION_DATA::random(rng),
34836            )),
34837            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
34838                VIDEO_STREAM_STATUS_DATA::random(rng),
34839            )),
34840            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
34841                VISION_POSITION_ESTIMATE_DATA::random(rng),
34842            )),
34843            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
34844                VISION_SPEED_ESTIMATE_DATA::random(rng),
34845            )),
34846            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::random(rng))),
34847            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::random(rng))),
34848            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::random(rng))),
34849            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::random(rng))),
34850            _ => None,
34851        }
34852    }
34853    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
34854        match self {
34855            Self::ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
34856            Self::ACTUATOR_OUTPUT_STATUS(body) => body.ser(version, bytes),
34857            Self::ADSB_VEHICLE(body) => body.ser(version, bytes),
34858            Self::AIS_VESSEL(body) => body.ser(version, bytes),
34859            Self::ALTITUDE(body) => body.ser(version, bytes),
34860            Self::ATTITUDE(body) => body.ser(version, bytes),
34861            Self::ATTITUDE_QUATERNION(body) => body.ser(version, bytes),
34862            Self::ATTITUDE_QUATERNION_COV(body) => body.ser(version, bytes),
34863            Self::ATTITUDE_TARGET(body) => body.ser(version, bytes),
34864            Self::ATT_POS_MOCAP(body) => body.ser(version, bytes),
34865            Self::AUTH_KEY(body) => body.ser(version, bytes),
34866            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(body) => body.ser(version, bytes),
34867            Self::AUTOPILOT_VERSION(body) => body.ser(version, bytes),
34868            Self::AVAILABLE_MODES(body) => body.ser(version, bytes),
34869            Self::AVAILABLE_MODES_MONITOR(body) => body.ser(version, bytes),
34870            Self::BATTERY_INFO(body) => body.ser(version, bytes),
34871            Self::BATTERY_STATUS(body) => body.ser(version, bytes),
34872            Self::BUTTON_CHANGE(body) => body.ser(version, bytes),
34873            Self::CAMERA_CAPTURE_STATUS(body) => body.ser(version, bytes),
34874            Self::CAMERA_FOV_STATUS(body) => body.ser(version, bytes),
34875            Self::CAMERA_IMAGE_CAPTURED(body) => body.ser(version, bytes),
34876            Self::CAMERA_INFORMATION(body) => body.ser(version, bytes),
34877            Self::CAMERA_SETTINGS(body) => body.ser(version, bytes),
34878            Self::CAMERA_THERMAL_RANGE(body) => body.ser(version, bytes),
34879            Self::CAMERA_TRACKING_GEO_STATUS(body) => body.ser(version, bytes),
34880            Self::CAMERA_TRACKING_IMAGE_STATUS(body) => body.ser(version, bytes),
34881            Self::CAMERA_TRIGGER(body) => body.ser(version, bytes),
34882            Self::CANFD_FRAME(body) => body.ser(version, bytes),
34883            Self::CAN_FILTER_MODIFY(body) => body.ser(version, bytes),
34884            Self::CAN_FRAME(body) => body.ser(version, bytes),
34885            Self::CELLULAR_CONFIG(body) => body.ser(version, bytes),
34886            Self::CELLULAR_STATUS(body) => body.ser(version, bytes),
34887            Self::CHANGE_OPERATOR_CONTROL(body) => body.ser(version, bytes),
34888            Self::CHANGE_OPERATOR_CONTROL_ACK(body) => body.ser(version, bytes),
34889            Self::COLLISION(body) => body.ser(version, bytes),
34890            Self::COMMAND_ACK(body) => body.ser(version, bytes),
34891            Self::COMMAND_CANCEL(body) => body.ser(version, bytes),
34892            Self::COMMAND_INT(body) => body.ser(version, bytes),
34893            Self::COMMAND_LONG(body) => body.ser(version, bytes),
34894            Self::COMPONENT_INFORMATION(body) => body.ser(version, bytes),
34895            Self::COMPONENT_INFORMATION_BASIC(body) => body.ser(version, bytes),
34896            Self::COMPONENT_METADATA(body) => body.ser(version, bytes),
34897            Self::CONTROL_SYSTEM_STATE(body) => body.ser(version, bytes),
34898            Self::CURRENT_EVENT_SEQUENCE(body) => body.ser(version, bytes),
34899            Self::CURRENT_MODE(body) => body.ser(version, bytes),
34900            Self::DATA_STREAM(body) => body.ser(version, bytes),
34901            Self::DATA_TRANSMISSION_HANDSHAKE(body) => body.ser(version, bytes),
34902            Self::DEBUG(body) => body.ser(version, bytes),
34903            Self::DEBUG_FLOAT_ARRAY(body) => body.ser(version, bytes),
34904            Self::DEBUG_VECT(body) => body.ser(version, bytes),
34905            Self::DISTANCE_SENSOR(body) => body.ser(version, bytes),
34906            Self::EFI_STATUS(body) => body.ser(version, bytes),
34907            Self::ENCAPSULATED_DATA(body) => body.ser(version, bytes),
34908            Self::ESC_INFO(body) => body.ser(version, bytes),
34909            Self::ESC_STATUS(body) => body.ser(version, bytes),
34910            Self::ESTIMATOR_STATUS(body) => body.ser(version, bytes),
34911            Self::EVENT(body) => body.ser(version, bytes),
34912            Self::EXTENDED_SYS_STATE(body) => body.ser(version, bytes),
34913            Self::FENCE_STATUS(body) => body.ser(version, bytes),
34914            Self::FILE_TRANSFER_PROTOCOL(body) => body.ser(version, bytes),
34915            Self::FLIGHT_INFORMATION(body) => body.ser(version, bytes),
34916            Self::FOLLOW_TARGET(body) => body.ser(version, bytes),
34917            Self::FUEL_STATUS(body) => body.ser(version, bytes),
34918            Self::GENERATOR_STATUS(body) => body.ser(version, bytes),
34919            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(body) => body.ser(version, bytes),
34920            Self::GIMBAL_DEVICE_INFORMATION(body) => body.ser(version, bytes),
34921            Self::GIMBAL_DEVICE_SET_ATTITUDE(body) => body.ser(version, bytes),
34922            Self::GIMBAL_MANAGER_INFORMATION(body) => body.ser(version, bytes),
34923            Self::GIMBAL_MANAGER_SET_ATTITUDE(body) => body.ser(version, bytes),
34924            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(body) => body.ser(version, bytes),
34925            Self::GIMBAL_MANAGER_SET_PITCHYAW(body) => body.ser(version, bytes),
34926            Self::GIMBAL_MANAGER_STATUS(body) => body.ser(version, bytes),
34927            Self::GLOBAL_POSITION_INT(body) => body.ser(version, bytes),
34928            Self::GLOBAL_POSITION_INT_COV(body) => body.ser(version, bytes),
34929            Self::GLOBAL_VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
34930            Self::GPS2_RAW(body) => body.ser(version, bytes),
34931            Self::GPS2_RTK(body) => body.ser(version, bytes),
34932            Self::GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
34933            Self::GPS_INJECT_DATA(body) => body.ser(version, bytes),
34934            Self::GPS_INPUT(body) => body.ser(version, bytes),
34935            Self::GPS_RAW_INT(body) => body.ser(version, bytes),
34936            Self::GPS_RTCM_DATA(body) => body.ser(version, bytes),
34937            Self::GPS_RTK(body) => body.ser(version, bytes),
34938            Self::GPS_STATUS(body) => body.ser(version, bytes),
34939            Self::HEARTBEAT(body) => body.ser(version, bytes),
34940            Self::HIGHRES_IMU(body) => body.ser(version, bytes),
34941            Self::HIGH_LATENCY(body) => body.ser(version, bytes),
34942            Self::HIGH_LATENCY2(body) => body.ser(version, bytes),
34943            Self::HIL_ACTUATOR_CONTROLS(body) => body.ser(version, bytes),
34944            Self::HIL_CONTROLS(body) => body.ser(version, bytes),
34945            Self::HIL_GPS(body) => body.ser(version, bytes),
34946            Self::HIL_OPTICAL_FLOW(body) => body.ser(version, bytes),
34947            Self::HIL_RC_INPUTS_RAW(body) => body.ser(version, bytes),
34948            Self::HIL_SENSOR(body) => body.ser(version, bytes),
34949            Self::HIL_STATE(body) => body.ser(version, bytes),
34950            Self::HIL_STATE_QUATERNION(body) => body.ser(version, bytes),
34951            Self::HOME_POSITION(body) => body.ser(version, bytes),
34952            Self::HYGROMETER_SENSOR(body) => body.ser(version, bytes),
34953            Self::ILLUMINATOR_STATUS(body) => body.ser(version, bytes),
34954            Self::ISBD_LINK_STATUS(body) => body.ser(version, bytes),
34955            Self::LANDING_TARGET(body) => body.ser(version, bytes),
34956            Self::LINK_NODE_STATUS(body) => body.ser(version, bytes),
34957            Self::LOCAL_POSITION_NED(body) => body.ser(version, bytes),
34958            Self::LOCAL_POSITION_NED_COV(body) => body.ser(version, bytes),
34959            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(body) => body.ser(version, bytes),
34960            Self::LOGGING_ACK(body) => body.ser(version, bytes),
34961            Self::LOGGING_DATA(body) => body.ser(version, bytes),
34962            Self::LOGGING_DATA_ACKED(body) => body.ser(version, bytes),
34963            Self::LOG_DATA(body) => body.ser(version, bytes),
34964            Self::LOG_ENTRY(body) => body.ser(version, bytes),
34965            Self::LOG_ERASE(body) => body.ser(version, bytes),
34966            Self::LOG_REQUEST_DATA(body) => body.ser(version, bytes),
34967            Self::LOG_REQUEST_END(body) => body.ser(version, bytes),
34968            Self::LOG_REQUEST_LIST(body) => body.ser(version, bytes),
34969            Self::MAG_CAL_REPORT(body) => body.ser(version, bytes),
34970            Self::MANUAL_CONTROL(body) => body.ser(version, bytes),
34971            Self::MANUAL_SETPOINT(body) => body.ser(version, bytes),
34972            Self::MEMORY_VECT(body) => body.ser(version, bytes),
34973            Self::MESSAGE_INTERVAL(body) => body.ser(version, bytes),
34974            Self::MISSION_ACK(body) => body.ser(version, bytes),
34975            Self::MISSION_CLEAR_ALL(body) => body.ser(version, bytes),
34976            Self::MISSION_COUNT(body) => body.ser(version, bytes),
34977            Self::MISSION_CURRENT(body) => body.ser(version, bytes),
34978            Self::MISSION_ITEM(body) => body.ser(version, bytes),
34979            Self::MISSION_ITEM_INT(body) => body.ser(version, bytes),
34980            Self::MISSION_ITEM_REACHED(body) => body.ser(version, bytes),
34981            Self::MISSION_REQUEST(body) => body.ser(version, bytes),
34982            Self::MISSION_REQUEST_INT(body) => body.ser(version, bytes),
34983            Self::MISSION_REQUEST_LIST(body) => body.ser(version, bytes),
34984            Self::MISSION_REQUEST_PARTIAL_LIST(body) => body.ser(version, bytes),
34985            Self::MISSION_SET_CURRENT(body) => body.ser(version, bytes),
34986            Self::MISSION_WRITE_PARTIAL_LIST(body) => body.ser(version, bytes),
34987            Self::MOUNT_ORIENTATION(body) => body.ser(version, bytes),
34988            Self::NAMED_VALUE_FLOAT(body) => body.ser(version, bytes),
34989            Self::NAMED_VALUE_INT(body) => body.ser(version, bytes),
34990            Self::NAV_CONTROLLER_OUTPUT(body) => body.ser(version, bytes),
34991            Self::OBSTACLE_DISTANCE(body) => body.ser(version, bytes),
34992            Self::ODOMETRY(body) => body.ser(version, bytes),
34993            Self::ONBOARD_COMPUTER_STATUS(body) => body.ser(version, bytes),
34994            Self::OPEN_DRONE_ID_ARM_STATUS(body) => body.ser(version, bytes),
34995            Self::OPEN_DRONE_ID_AUTHENTICATION(body) => body.ser(version, bytes),
34996            Self::OPEN_DRONE_ID_BASIC_ID(body) => body.ser(version, bytes),
34997            Self::OPEN_DRONE_ID_LOCATION(body) => body.ser(version, bytes),
34998            Self::OPEN_DRONE_ID_MESSAGE_PACK(body) => body.ser(version, bytes),
34999            Self::OPEN_DRONE_ID_OPERATOR_ID(body) => body.ser(version, bytes),
35000            Self::OPEN_DRONE_ID_SELF_ID(body) => body.ser(version, bytes),
35001            Self::OPEN_DRONE_ID_SYSTEM(body) => body.ser(version, bytes),
35002            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(body) => body.ser(version, bytes),
35003            Self::OPTICAL_FLOW(body) => body.ser(version, bytes),
35004            Self::OPTICAL_FLOW_RAD(body) => body.ser(version, bytes),
35005            Self::ORBIT_EXECUTION_STATUS(body) => body.ser(version, bytes),
35006            Self::PARAM_EXT_ACK(body) => body.ser(version, bytes),
35007            Self::PARAM_EXT_REQUEST_LIST(body) => body.ser(version, bytes),
35008            Self::PARAM_EXT_REQUEST_READ(body) => body.ser(version, bytes),
35009            Self::PARAM_EXT_SET(body) => body.ser(version, bytes),
35010            Self::PARAM_EXT_VALUE(body) => body.ser(version, bytes),
35011            Self::PARAM_MAP_RC(body) => body.ser(version, bytes),
35012            Self::PARAM_REQUEST_LIST(body) => body.ser(version, bytes),
35013            Self::PARAM_REQUEST_READ(body) => body.ser(version, bytes),
35014            Self::PARAM_SET(body) => body.ser(version, bytes),
35015            Self::PARAM_VALUE(body) => body.ser(version, bytes),
35016            Self::PING(body) => body.ser(version, bytes),
35017            Self::PLAY_TUNE(body) => body.ser(version, bytes),
35018            Self::PLAY_TUNE_V2(body) => body.ser(version, bytes),
35019            Self::POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
35020            Self::POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
35021            Self::POWER_STATUS(body) => body.ser(version, bytes),
35022            Self::PROTOCOL_VERSION(body) => body.ser(version, bytes),
35023            Self::RADIO_STATUS(body) => body.ser(version, bytes),
35024            Self::RAW_IMU(body) => body.ser(version, bytes),
35025            Self::RAW_PRESSURE(body) => body.ser(version, bytes),
35026            Self::RAW_RPM(body) => body.ser(version, bytes),
35027            Self::RC_CHANNELS(body) => body.ser(version, bytes),
35028            Self::RC_CHANNELS_OVERRIDE(body) => body.ser(version, bytes),
35029            Self::RC_CHANNELS_RAW(body) => body.ser(version, bytes),
35030            Self::RC_CHANNELS_SCALED(body) => body.ser(version, bytes),
35031            Self::REQUEST_DATA_STREAM(body) => body.ser(version, bytes),
35032            Self::REQUEST_EVENT(body) => body.ser(version, bytes),
35033            Self::RESOURCE_REQUEST(body) => body.ser(version, bytes),
35034            Self::RESPONSE_EVENT_ERROR(body) => body.ser(version, bytes),
35035            Self::SAFETY_ALLOWED_AREA(body) => body.ser(version, bytes),
35036            Self::SAFETY_SET_ALLOWED_AREA(body) => body.ser(version, bytes),
35037            Self::SCALED_IMU(body) => body.ser(version, bytes),
35038            Self::SCALED_IMU2(body) => body.ser(version, bytes),
35039            Self::SCALED_IMU3(body) => body.ser(version, bytes),
35040            Self::SCALED_PRESSURE(body) => body.ser(version, bytes),
35041            Self::SCALED_PRESSURE2(body) => body.ser(version, bytes),
35042            Self::SCALED_PRESSURE3(body) => body.ser(version, bytes),
35043            Self::SERIAL_CONTROL(body) => body.ser(version, bytes),
35044            Self::SERVO_OUTPUT_RAW(body) => body.ser(version, bytes),
35045            Self::SETUP_SIGNING(body) => body.ser(version, bytes),
35046            Self::SET_ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
35047            Self::SET_ATTITUDE_TARGET(body) => body.ser(version, bytes),
35048            Self::SET_GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
35049            Self::SET_HOME_POSITION(body) => body.ser(version, bytes),
35050            Self::SET_MODE(body) => body.ser(version, bytes),
35051            Self::SET_POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
35052            Self::SET_POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
35053            Self::SIM_STATE(body) => body.ser(version, bytes),
35054            Self::SMART_BATTERY_INFO(body) => body.ser(version, bytes),
35055            Self::STATUSTEXT(body) => body.ser(version, bytes),
35056            Self::STORAGE_INFORMATION(body) => body.ser(version, bytes),
35057            Self::SUPPORTED_TUNES(body) => body.ser(version, bytes),
35058            Self::SYSTEM_TIME(body) => body.ser(version, bytes),
35059            Self::SYS_STATUS(body) => body.ser(version, bytes),
35060            Self::TERRAIN_CHECK(body) => body.ser(version, bytes),
35061            Self::TERRAIN_DATA(body) => body.ser(version, bytes),
35062            Self::TERRAIN_REPORT(body) => body.ser(version, bytes),
35063            Self::TERRAIN_REQUEST(body) => body.ser(version, bytes),
35064            Self::TIMESYNC(body) => body.ser(version, bytes),
35065            Self::TIME_ESTIMATE_TO_TARGET(body) => body.ser(version, bytes),
35066            Self::TRAJECTORY_REPRESENTATION_BEZIER(body) => body.ser(version, bytes),
35067            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(body) => body.ser(version, bytes),
35068            Self::TUNNEL(body) => body.ser(version, bytes),
35069            Self::UAVCAN_NODE_INFO(body) => body.ser(version, bytes),
35070            Self::UAVCAN_NODE_STATUS(body) => body.ser(version, bytes),
35071            Self::UAVIONIX_ADSB_GET(body) => body.ser(version, bytes),
35072            Self::UAVIONIX_ADSB_OUT_CFG(body) => body.ser(version, bytes),
35073            Self::UAVIONIX_ADSB_OUT_CFG_FLIGHTID(body) => body.ser(version, bytes),
35074            Self::UAVIONIX_ADSB_OUT_CFG_REGISTRATION(body) => body.ser(version, bytes),
35075            Self::UAVIONIX_ADSB_OUT_CONTROL(body) => body.ser(version, bytes),
35076            Self::UAVIONIX_ADSB_OUT_DYNAMIC(body) => body.ser(version, bytes),
35077            Self::UAVIONIX_ADSB_OUT_STATUS(body) => body.ser(version, bytes),
35078            Self::UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT(body) => body.ser(version, bytes),
35079            Self::UTM_GLOBAL_POSITION(body) => body.ser(version, bytes),
35080            Self::V2_EXTENSION(body) => body.ser(version, bytes),
35081            Self::VFR_HUD(body) => body.ser(version, bytes),
35082            Self::VIBRATION(body) => body.ser(version, bytes),
35083            Self::VICON_POSITION_ESTIMATE(body) => body.ser(version, bytes),
35084            Self::VIDEO_STREAM_INFORMATION(body) => body.ser(version, bytes),
35085            Self::VIDEO_STREAM_STATUS(body) => body.ser(version, bytes),
35086            Self::VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
35087            Self::VISION_SPEED_ESTIMATE(body) => body.ser(version, bytes),
35088            Self::WHEEL_DISTANCE(body) => body.ser(version, bytes),
35089            Self::WIFI_CONFIG_AP(body) => body.ser(version, bytes),
35090            Self::WINCH_STATUS(body) => body.ser(version, bytes),
35091            Self::WIND_COV(body) => body.ser(version, bytes),
35092        }
35093    }
35094    fn extra_crc(id: u32) -> u8 {
35095        match id {
35096            ACTUATOR_CONTROL_TARGET_DATA::ID => ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
35097            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::EXTRA_CRC,
35098            ADSB_VEHICLE_DATA::ID => ADSB_VEHICLE_DATA::EXTRA_CRC,
35099            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::EXTRA_CRC,
35100            ALTITUDE_DATA::ID => ALTITUDE_DATA::EXTRA_CRC,
35101            ATTITUDE_DATA::ID => ATTITUDE_DATA::EXTRA_CRC,
35102            ATTITUDE_QUATERNION_DATA::ID => ATTITUDE_QUATERNION_DATA::EXTRA_CRC,
35103            ATTITUDE_QUATERNION_COV_DATA::ID => ATTITUDE_QUATERNION_COV_DATA::EXTRA_CRC,
35104            ATTITUDE_TARGET_DATA::ID => ATTITUDE_TARGET_DATA::EXTRA_CRC,
35105            ATT_POS_MOCAP_DATA::ID => ATT_POS_MOCAP_DATA::EXTRA_CRC,
35106            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::EXTRA_CRC,
35107            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
35108                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::EXTRA_CRC
35109            }
35110            AUTOPILOT_VERSION_DATA::ID => AUTOPILOT_VERSION_DATA::EXTRA_CRC,
35111            AVAILABLE_MODES_DATA::ID => AVAILABLE_MODES_DATA::EXTRA_CRC,
35112            AVAILABLE_MODES_MONITOR_DATA::ID => AVAILABLE_MODES_MONITOR_DATA::EXTRA_CRC,
35113            BATTERY_INFO_DATA::ID => BATTERY_INFO_DATA::EXTRA_CRC,
35114            BATTERY_STATUS_DATA::ID => BATTERY_STATUS_DATA::EXTRA_CRC,
35115            BUTTON_CHANGE_DATA::ID => BUTTON_CHANGE_DATA::EXTRA_CRC,
35116            CAMERA_CAPTURE_STATUS_DATA::ID => CAMERA_CAPTURE_STATUS_DATA::EXTRA_CRC,
35117            CAMERA_FOV_STATUS_DATA::ID => CAMERA_FOV_STATUS_DATA::EXTRA_CRC,
35118            CAMERA_IMAGE_CAPTURED_DATA::ID => CAMERA_IMAGE_CAPTURED_DATA::EXTRA_CRC,
35119            CAMERA_INFORMATION_DATA::ID => CAMERA_INFORMATION_DATA::EXTRA_CRC,
35120            CAMERA_SETTINGS_DATA::ID => CAMERA_SETTINGS_DATA::EXTRA_CRC,
35121            CAMERA_THERMAL_RANGE_DATA::ID => CAMERA_THERMAL_RANGE_DATA::EXTRA_CRC,
35122            CAMERA_TRACKING_GEO_STATUS_DATA::ID => CAMERA_TRACKING_GEO_STATUS_DATA::EXTRA_CRC,
35123            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => CAMERA_TRACKING_IMAGE_STATUS_DATA::EXTRA_CRC,
35124            CAMERA_TRIGGER_DATA::ID => CAMERA_TRIGGER_DATA::EXTRA_CRC,
35125            CANFD_FRAME_DATA::ID => CANFD_FRAME_DATA::EXTRA_CRC,
35126            CAN_FILTER_MODIFY_DATA::ID => CAN_FILTER_MODIFY_DATA::EXTRA_CRC,
35127            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::EXTRA_CRC,
35128            CELLULAR_CONFIG_DATA::ID => CELLULAR_CONFIG_DATA::EXTRA_CRC,
35129            CELLULAR_STATUS_DATA::ID => CELLULAR_STATUS_DATA::EXTRA_CRC,
35130            CHANGE_OPERATOR_CONTROL_DATA::ID => CHANGE_OPERATOR_CONTROL_DATA::EXTRA_CRC,
35131            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => CHANGE_OPERATOR_CONTROL_ACK_DATA::EXTRA_CRC,
35132            COLLISION_DATA::ID => COLLISION_DATA::EXTRA_CRC,
35133            COMMAND_ACK_DATA::ID => COMMAND_ACK_DATA::EXTRA_CRC,
35134            COMMAND_CANCEL_DATA::ID => COMMAND_CANCEL_DATA::EXTRA_CRC,
35135            COMMAND_INT_DATA::ID => COMMAND_INT_DATA::EXTRA_CRC,
35136            COMMAND_LONG_DATA::ID => COMMAND_LONG_DATA::EXTRA_CRC,
35137            COMPONENT_INFORMATION_DATA::ID => COMPONENT_INFORMATION_DATA::EXTRA_CRC,
35138            COMPONENT_INFORMATION_BASIC_DATA::ID => COMPONENT_INFORMATION_BASIC_DATA::EXTRA_CRC,
35139            COMPONENT_METADATA_DATA::ID => COMPONENT_METADATA_DATA::EXTRA_CRC,
35140            CONTROL_SYSTEM_STATE_DATA::ID => CONTROL_SYSTEM_STATE_DATA::EXTRA_CRC,
35141            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::EXTRA_CRC,
35142            CURRENT_MODE_DATA::ID => CURRENT_MODE_DATA::EXTRA_CRC,
35143            DATA_STREAM_DATA::ID => DATA_STREAM_DATA::EXTRA_CRC,
35144            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => DATA_TRANSMISSION_HANDSHAKE_DATA::EXTRA_CRC,
35145            DEBUG_DATA::ID => DEBUG_DATA::EXTRA_CRC,
35146            DEBUG_FLOAT_ARRAY_DATA::ID => DEBUG_FLOAT_ARRAY_DATA::EXTRA_CRC,
35147            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::EXTRA_CRC,
35148            DISTANCE_SENSOR_DATA::ID => DISTANCE_SENSOR_DATA::EXTRA_CRC,
35149            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::EXTRA_CRC,
35150            ENCAPSULATED_DATA_DATA::ID => ENCAPSULATED_DATA_DATA::EXTRA_CRC,
35151            ESC_INFO_DATA::ID => ESC_INFO_DATA::EXTRA_CRC,
35152            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::EXTRA_CRC,
35153            ESTIMATOR_STATUS_DATA::ID => ESTIMATOR_STATUS_DATA::EXTRA_CRC,
35154            EVENT_DATA::ID => EVENT_DATA::EXTRA_CRC,
35155            EXTENDED_SYS_STATE_DATA::ID => EXTENDED_SYS_STATE_DATA::EXTRA_CRC,
35156            FENCE_STATUS_DATA::ID => FENCE_STATUS_DATA::EXTRA_CRC,
35157            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::EXTRA_CRC,
35158            FLIGHT_INFORMATION_DATA::ID => FLIGHT_INFORMATION_DATA::EXTRA_CRC,
35159            FOLLOW_TARGET_DATA::ID => FOLLOW_TARGET_DATA::EXTRA_CRC,
35160            FUEL_STATUS_DATA::ID => FUEL_STATUS_DATA::EXTRA_CRC,
35161            GENERATOR_STATUS_DATA::ID => GENERATOR_STATUS_DATA::EXTRA_CRC,
35162            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::EXTRA_CRC,
35163            GIMBAL_DEVICE_INFORMATION_DATA::ID => GIMBAL_DEVICE_INFORMATION_DATA::EXTRA_CRC,
35164            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => GIMBAL_DEVICE_SET_ATTITUDE_DATA::EXTRA_CRC,
35165            GIMBAL_MANAGER_INFORMATION_DATA::ID => GIMBAL_MANAGER_INFORMATION_DATA::EXTRA_CRC,
35166            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => GIMBAL_MANAGER_SET_ATTITUDE_DATA::EXTRA_CRC,
35167            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
35168                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::EXTRA_CRC
35169            }
35170            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => GIMBAL_MANAGER_SET_PITCHYAW_DATA::EXTRA_CRC,
35171            GIMBAL_MANAGER_STATUS_DATA::ID => GIMBAL_MANAGER_STATUS_DATA::EXTRA_CRC,
35172            GLOBAL_POSITION_INT_DATA::ID => GLOBAL_POSITION_INT_DATA::EXTRA_CRC,
35173            GLOBAL_POSITION_INT_COV_DATA::ID => GLOBAL_POSITION_INT_COV_DATA::EXTRA_CRC,
35174            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
35175                GLOBAL_VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC
35176            }
35177            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::EXTRA_CRC,
35178            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::EXTRA_CRC,
35179            GPS_GLOBAL_ORIGIN_DATA::ID => GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
35180            GPS_INJECT_DATA_DATA::ID => GPS_INJECT_DATA_DATA::EXTRA_CRC,
35181            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::EXTRA_CRC,
35182            GPS_RAW_INT_DATA::ID => GPS_RAW_INT_DATA::EXTRA_CRC,
35183            GPS_RTCM_DATA_DATA::ID => GPS_RTCM_DATA_DATA::EXTRA_CRC,
35184            GPS_RTK_DATA::ID => GPS_RTK_DATA::EXTRA_CRC,
35185            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::EXTRA_CRC,
35186            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::EXTRA_CRC,
35187            HIGHRES_IMU_DATA::ID => HIGHRES_IMU_DATA::EXTRA_CRC,
35188            HIGH_LATENCY_DATA::ID => HIGH_LATENCY_DATA::EXTRA_CRC,
35189            HIGH_LATENCY2_DATA::ID => HIGH_LATENCY2_DATA::EXTRA_CRC,
35190            HIL_ACTUATOR_CONTROLS_DATA::ID => HIL_ACTUATOR_CONTROLS_DATA::EXTRA_CRC,
35191            HIL_CONTROLS_DATA::ID => HIL_CONTROLS_DATA::EXTRA_CRC,
35192            HIL_GPS_DATA::ID => HIL_GPS_DATA::EXTRA_CRC,
35193            HIL_OPTICAL_FLOW_DATA::ID => HIL_OPTICAL_FLOW_DATA::EXTRA_CRC,
35194            HIL_RC_INPUTS_RAW_DATA::ID => HIL_RC_INPUTS_RAW_DATA::EXTRA_CRC,
35195            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::EXTRA_CRC,
35196            HIL_STATE_DATA::ID => HIL_STATE_DATA::EXTRA_CRC,
35197            HIL_STATE_QUATERNION_DATA::ID => HIL_STATE_QUATERNION_DATA::EXTRA_CRC,
35198            HOME_POSITION_DATA::ID => HOME_POSITION_DATA::EXTRA_CRC,
35199            HYGROMETER_SENSOR_DATA::ID => HYGROMETER_SENSOR_DATA::EXTRA_CRC,
35200            ILLUMINATOR_STATUS_DATA::ID => ILLUMINATOR_STATUS_DATA::EXTRA_CRC,
35201            ISBD_LINK_STATUS_DATA::ID => ISBD_LINK_STATUS_DATA::EXTRA_CRC,
35202            LANDING_TARGET_DATA::ID => LANDING_TARGET_DATA::EXTRA_CRC,
35203            LINK_NODE_STATUS_DATA::ID => LINK_NODE_STATUS_DATA::EXTRA_CRC,
35204            LOCAL_POSITION_NED_DATA::ID => LOCAL_POSITION_NED_DATA::EXTRA_CRC,
35205            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::EXTRA_CRC,
35206            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
35207                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::EXTRA_CRC
35208            }
35209            LOGGING_ACK_DATA::ID => LOGGING_ACK_DATA::EXTRA_CRC,
35210            LOGGING_DATA_DATA::ID => LOGGING_DATA_DATA::EXTRA_CRC,
35211            LOGGING_DATA_ACKED_DATA::ID => LOGGING_DATA_ACKED_DATA::EXTRA_CRC,
35212            LOG_DATA_DATA::ID => LOG_DATA_DATA::EXTRA_CRC,
35213            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::EXTRA_CRC,
35214            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::EXTRA_CRC,
35215            LOG_REQUEST_DATA_DATA::ID => LOG_REQUEST_DATA_DATA::EXTRA_CRC,
35216            LOG_REQUEST_END_DATA::ID => LOG_REQUEST_END_DATA::EXTRA_CRC,
35217            LOG_REQUEST_LIST_DATA::ID => LOG_REQUEST_LIST_DATA::EXTRA_CRC,
35218            MAG_CAL_REPORT_DATA::ID => MAG_CAL_REPORT_DATA::EXTRA_CRC,
35219            MANUAL_CONTROL_DATA::ID => MANUAL_CONTROL_DATA::EXTRA_CRC,
35220            MANUAL_SETPOINT_DATA::ID => MANUAL_SETPOINT_DATA::EXTRA_CRC,
35221            MEMORY_VECT_DATA::ID => MEMORY_VECT_DATA::EXTRA_CRC,
35222            MESSAGE_INTERVAL_DATA::ID => MESSAGE_INTERVAL_DATA::EXTRA_CRC,
35223            MISSION_ACK_DATA::ID => MISSION_ACK_DATA::EXTRA_CRC,
35224            MISSION_CLEAR_ALL_DATA::ID => MISSION_CLEAR_ALL_DATA::EXTRA_CRC,
35225            MISSION_COUNT_DATA::ID => MISSION_COUNT_DATA::EXTRA_CRC,
35226            MISSION_CURRENT_DATA::ID => MISSION_CURRENT_DATA::EXTRA_CRC,
35227            MISSION_ITEM_DATA::ID => MISSION_ITEM_DATA::EXTRA_CRC,
35228            MISSION_ITEM_INT_DATA::ID => MISSION_ITEM_INT_DATA::EXTRA_CRC,
35229            MISSION_ITEM_REACHED_DATA::ID => MISSION_ITEM_REACHED_DATA::EXTRA_CRC,
35230            MISSION_REQUEST_DATA::ID => MISSION_REQUEST_DATA::EXTRA_CRC,
35231            MISSION_REQUEST_INT_DATA::ID => MISSION_REQUEST_INT_DATA::EXTRA_CRC,
35232            MISSION_REQUEST_LIST_DATA::ID => MISSION_REQUEST_LIST_DATA::EXTRA_CRC,
35233            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => MISSION_REQUEST_PARTIAL_LIST_DATA::EXTRA_CRC,
35234            MISSION_SET_CURRENT_DATA::ID => MISSION_SET_CURRENT_DATA::EXTRA_CRC,
35235            MISSION_WRITE_PARTIAL_LIST_DATA::ID => MISSION_WRITE_PARTIAL_LIST_DATA::EXTRA_CRC,
35236            MOUNT_ORIENTATION_DATA::ID => MOUNT_ORIENTATION_DATA::EXTRA_CRC,
35237            NAMED_VALUE_FLOAT_DATA::ID => NAMED_VALUE_FLOAT_DATA::EXTRA_CRC,
35238            NAMED_VALUE_INT_DATA::ID => NAMED_VALUE_INT_DATA::EXTRA_CRC,
35239            NAV_CONTROLLER_OUTPUT_DATA::ID => NAV_CONTROLLER_OUTPUT_DATA::EXTRA_CRC,
35240            OBSTACLE_DISTANCE_DATA::ID => OBSTACLE_DISTANCE_DATA::EXTRA_CRC,
35241            ODOMETRY_DATA::ID => ODOMETRY_DATA::EXTRA_CRC,
35242            ONBOARD_COMPUTER_STATUS_DATA::ID => ONBOARD_COMPUTER_STATUS_DATA::EXTRA_CRC,
35243            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => OPEN_DRONE_ID_ARM_STATUS_DATA::EXTRA_CRC,
35244            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => OPEN_DRONE_ID_AUTHENTICATION_DATA::EXTRA_CRC,
35245            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::EXTRA_CRC,
35246            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::EXTRA_CRC,
35247            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => OPEN_DRONE_ID_MESSAGE_PACK_DATA::EXTRA_CRC,
35248            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => OPEN_DRONE_ID_OPERATOR_ID_DATA::EXTRA_CRC,
35249            OPEN_DRONE_ID_SELF_ID_DATA::ID => OPEN_DRONE_ID_SELF_ID_DATA::EXTRA_CRC,
35250            OPEN_DRONE_ID_SYSTEM_DATA::ID => OPEN_DRONE_ID_SYSTEM_DATA::EXTRA_CRC,
35251            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::EXTRA_CRC,
35252            OPTICAL_FLOW_DATA::ID => OPTICAL_FLOW_DATA::EXTRA_CRC,
35253            OPTICAL_FLOW_RAD_DATA::ID => OPTICAL_FLOW_RAD_DATA::EXTRA_CRC,
35254            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::EXTRA_CRC,
35255            PARAM_EXT_ACK_DATA::ID => PARAM_EXT_ACK_DATA::EXTRA_CRC,
35256            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::EXTRA_CRC,
35257            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::EXTRA_CRC,
35258            PARAM_EXT_SET_DATA::ID => PARAM_EXT_SET_DATA::EXTRA_CRC,
35259            PARAM_EXT_VALUE_DATA::ID => PARAM_EXT_VALUE_DATA::EXTRA_CRC,
35260            PARAM_MAP_RC_DATA::ID => PARAM_MAP_RC_DATA::EXTRA_CRC,
35261            PARAM_REQUEST_LIST_DATA::ID => PARAM_REQUEST_LIST_DATA::EXTRA_CRC,
35262            PARAM_REQUEST_READ_DATA::ID => PARAM_REQUEST_READ_DATA::EXTRA_CRC,
35263            PARAM_SET_DATA::ID => PARAM_SET_DATA::EXTRA_CRC,
35264            PARAM_VALUE_DATA::ID => PARAM_VALUE_DATA::EXTRA_CRC,
35265            PING_DATA::ID => PING_DATA::EXTRA_CRC,
35266            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::EXTRA_CRC,
35267            PLAY_TUNE_V2_DATA::ID => PLAY_TUNE_V2_DATA::EXTRA_CRC,
35268            POSITION_TARGET_GLOBAL_INT_DATA::ID => POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC,
35269            POSITION_TARGET_LOCAL_NED_DATA::ID => POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
35270            POWER_STATUS_DATA::ID => POWER_STATUS_DATA::EXTRA_CRC,
35271            PROTOCOL_VERSION_DATA::ID => PROTOCOL_VERSION_DATA::EXTRA_CRC,
35272            RADIO_STATUS_DATA::ID => RADIO_STATUS_DATA::EXTRA_CRC,
35273            RAW_IMU_DATA::ID => RAW_IMU_DATA::EXTRA_CRC,
35274            RAW_PRESSURE_DATA::ID => RAW_PRESSURE_DATA::EXTRA_CRC,
35275            RAW_RPM_DATA::ID => RAW_RPM_DATA::EXTRA_CRC,
35276            RC_CHANNELS_DATA::ID => RC_CHANNELS_DATA::EXTRA_CRC,
35277            RC_CHANNELS_OVERRIDE_DATA::ID => RC_CHANNELS_OVERRIDE_DATA::EXTRA_CRC,
35278            RC_CHANNELS_RAW_DATA::ID => RC_CHANNELS_RAW_DATA::EXTRA_CRC,
35279            RC_CHANNELS_SCALED_DATA::ID => RC_CHANNELS_SCALED_DATA::EXTRA_CRC,
35280            REQUEST_DATA_STREAM_DATA::ID => REQUEST_DATA_STREAM_DATA::EXTRA_CRC,
35281            REQUEST_EVENT_DATA::ID => REQUEST_EVENT_DATA::EXTRA_CRC,
35282            RESOURCE_REQUEST_DATA::ID => RESOURCE_REQUEST_DATA::EXTRA_CRC,
35283            RESPONSE_EVENT_ERROR_DATA::ID => RESPONSE_EVENT_ERROR_DATA::EXTRA_CRC,
35284            SAFETY_ALLOWED_AREA_DATA::ID => SAFETY_ALLOWED_AREA_DATA::EXTRA_CRC,
35285            SAFETY_SET_ALLOWED_AREA_DATA::ID => SAFETY_SET_ALLOWED_AREA_DATA::EXTRA_CRC,
35286            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::EXTRA_CRC,
35287            SCALED_IMU2_DATA::ID => SCALED_IMU2_DATA::EXTRA_CRC,
35288            SCALED_IMU3_DATA::ID => SCALED_IMU3_DATA::EXTRA_CRC,
35289            SCALED_PRESSURE_DATA::ID => SCALED_PRESSURE_DATA::EXTRA_CRC,
35290            SCALED_PRESSURE2_DATA::ID => SCALED_PRESSURE2_DATA::EXTRA_CRC,
35291            SCALED_PRESSURE3_DATA::ID => SCALED_PRESSURE3_DATA::EXTRA_CRC,
35292            SERIAL_CONTROL_DATA::ID => SERIAL_CONTROL_DATA::EXTRA_CRC,
35293            SERVO_OUTPUT_RAW_DATA::ID => SERVO_OUTPUT_RAW_DATA::EXTRA_CRC,
35294            SETUP_SIGNING_DATA::ID => SETUP_SIGNING_DATA::EXTRA_CRC,
35295            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => SET_ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
35296            SET_ATTITUDE_TARGET_DATA::ID => SET_ATTITUDE_TARGET_DATA::EXTRA_CRC,
35297            SET_GPS_GLOBAL_ORIGIN_DATA::ID => SET_GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
35298            SET_HOME_POSITION_DATA::ID => SET_HOME_POSITION_DATA::EXTRA_CRC,
35299            SET_MODE_DATA::ID => SET_MODE_DATA::EXTRA_CRC,
35300            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
35301                SET_POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC
35302            }
35303            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => SET_POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
35304            SIM_STATE_DATA::ID => SIM_STATE_DATA::EXTRA_CRC,
35305            SMART_BATTERY_INFO_DATA::ID => SMART_BATTERY_INFO_DATA::EXTRA_CRC,
35306            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::EXTRA_CRC,
35307            STORAGE_INFORMATION_DATA::ID => STORAGE_INFORMATION_DATA::EXTRA_CRC,
35308            SUPPORTED_TUNES_DATA::ID => SUPPORTED_TUNES_DATA::EXTRA_CRC,
35309            SYSTEM_TIME_DATA::ID => SYSTEM_TIME_DATA::EXTRA_CRC,
35310            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::EXTRA_CRC,
35311            TERRAIN_CHECK_DATA::ID => TERRAIN_CHECK_DATA::EXTRA_CRC,
35312            TERRAIN_DATA_DATA::ID => TERRAIN_DATA_DATA::EXTRA_CRC,
35313            TERRAIN_REPORT_DATA::ID => TERRAIN_REPORT_DATA::EXTRA_CRC,
35314            TERRAIN_REQUEST_DATA::ID => TERRAIN_REQUEST_DATA::EXTRA_CRC,
35315            TIMESYNC_DATA::ID => TIMESYNC_DATA::EXTRA_CRC,
35316            TIME_ESTIMATE_TO_TARGET_DATA::ID => TIME_ESTIMATE_TO_TARGET_DATA::EXTRA_CRC,
35317            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
35318                TRAJECTORY_REPRESENTATION_BEZIER_DATA::EXTRA_CRC
35319            }
35320            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
35321                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::EXTRA_CRC
35322            }
35323            TUNNEL_DATA::ID => TUNNEL_DATA::EXTRA_CRC,
35324            UAVCAN_NODE_INFO_DATA::ID => UAVCAN_NODE_INFO_DATA::EXTRA_CRC,
35325            UAVCAN_NODE_STATUS_DATA::ID => UAVCAN_NODE_STATUS_DATA::EXTRA_CRC,
35326            UAVIONIX_ADSB_GET_DATA::ID => UAVIONIX_ADSB_GET_DATA::EXTRA_CRC,
35327            UAVIONIX_ADSB_OUT_CFG_DATA::ID => UAVIONIX_ADSB_OUT_CFG_DATA::EXTRA_CRC,
35328            UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA::ID => {
35329                UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA::EXTRA_CRC
35330            }
35331            UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA::ID => {
35332                UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA::EXTRA_CRC
35333            }
35334            UAVIONIX_ADSB_OUT_CONTROL_DATA::ID => UAVIONIX_ADSB_OUT_CONTROL_DATA::EXTRA_CRC,
35335            UAVIONIX_ADSB_OUT_DYNAMIC_DATA::ID => UAVIONIX_ADSB_OUT_DYNAMIC_DATA::EXTRA_CRC,
35336            UAVIONIX_ADSB_OUT_STATUS_DATA::ID => UAVIONIX_ADSB_OUT_STATUS_DATA::EXTRA_CRC,
35337            UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA::ID => {
35338                UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA::EXTRA_CRC
35339            }
35340            UTM_GLOBAL_POSITION_DATA::ID => UTM_GLOBAL_POSITION_DATA::EXTRA_CRC,
35341            V2_EXTENSION_DATA::ID => V2_EXTENSION_DATA::EXTRA_CRC,
35342            VFR_HUD_DATA::ID => VFR_HUD_DATA::EXTRA_CRC,
35343            VIBRATION_DATA::ID => VIBRATION_DATA::EXTRA_CRC,
35344            VICON_POSITION_ESTIMATE_DATA::ID => VICON_POSITION_ESTIMATE_DATA::EXTRA_CRC,
35345            VIDEO_STREAM_INFORMATION_DATA::ID => VIDEO_STREAM_INFORMATION_DATA::EXTRA_CRC,
35346            VIDEO_STREAM_STATUS_DATA::ID => VIDEO_STREAM_STATUS_DATA::EXTRA_CRC,
35347            VISION_POSITION_ESTIMATE_DATA::ID => VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC,
35348            VISION_SPEED_ESTIMATE_DATA::ID => VISION_SPEED_ESTIMATE_DATA::EXTRA_CRC,
35349            WHEEL_DISTANCE_DATA::ID => WHEEL_DISTANCE_DATA::EXTRA_CRC,
35350            WIFI_CONFIG_AP_DATA::ID => WIFI_CONFIG_AP_DATA::EXTRA_CRC,
35351            WINCH_STATUS_DATA::ID => WINCH_STATUS_DATA::EXTRA_CRC,
35352            WIND_COV_DATA::ID => WIND_COV_DATA::EXTRA_CRC,
35353            _ => 0,
35354        }
35355    }
35356    fn target_system_id(&self) -> Option<u8> {
35357        match self {
35358            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_system),
35359            Self::CANFD_FRAME(inner) => Some(inner.target_system),
35360            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_system),
35361            Self::CAN_FRAME(inner) => Some(inner.target_system),
35362            Self::CHANGE_OPERATOR_CONTROL(inner) => Some(inner.target_system),
35363            Self::COMMAND_ACK(inner) => Some(inner.target_system),
35364            Self::COMMAND_CANCEL(inner) => Some(inner.target_system),
35365            Self::COMMAND_INT(inner) => Some(inner.target_system),
35366            Self::COMMAND_LONG(inner) => Some(inner.target_system),
35367            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_system),
35368            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_system),
35369            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_system),
35370            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_system),
35371            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_system),
35372            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_system),
35373            Self::GPS_INJECT_DATA(inner) => Some(inner.target_system),
35374            Self::LOGGING_ACK(inner) => Some(inner.target_system),
35375            Self::LOGGING_DATA(inner) => Some(inner.target_system),
35376            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_system),
35377            Self::LOG_ERASE(inner) => Some(inner.target_system),
35378            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_system),
35379            Self::LOG_REQUEST_END(inner) => Some(inner.target_system),
35380            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_system),
35381            Self::MISSION_ACK(inner) => Some(inner.target_system),
35382            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_system),
35383            Self::MISSION_COUNT(inner) => Some(inner.target_system),
35384            Self::MISSION_ITEM(inner) => Some(inner.target_system),
35385            Self::MISSION_ITEM_INT(inner) => Some(inner.target_system),
35386            Self::MISSION_REQUEST(inner) => Some(inner.target_system),
35387            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_system),
35388            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_system),
35389            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_system),
35390            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_system),
35391            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_system),
35392            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_system),
35393            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_system),
35394            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_system),
35395            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_system),
35396            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_system),
35397            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_system),
35398            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_system),
35399            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_system),
35400            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_system),
35401            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_system),
35402            Self::PARAM_EXT_SET(inner) => Some(inner.target_system),
35403            Self::PARAM_MAP_RC(inner) => Some(inner.target_system),
35404            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_system),
35405            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_system),
35406            Self::PARAM_SET(inner) => Some(inner.target_system),
35407            Self::PING(inner) => Some(inner.target_system),
35408            Self::PLAY_TUNE(inner) => Some(inner.target_system),
35409            Self::PLAY_TUNE_V2(inner) => Some(inner.target_system),
35410            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_system),
35411            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_system),
35412            Self::REQUEST_EVENT(inner) => Some(inner.target_system),
35413            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_system),
35414            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_system),
35415            Self::SERIAL_CONTROL(inner) => Some(inner.target_system),
35416            Self::SETUP_SIGNING(inner) => Some(inner.target_system),
35417            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_system),
35418            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_system),
35419            Self::SET_GPS_GLOBAL_ORIGIN(inner) => Some(inner.target_system),
35420            Self::SET_HOME_POSITION(inner) => Some(inner.target_system),
35421            Self::SET_MODE(inner) => Some(inner.target_system),
35422            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_system),
35423            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_system),
35424            Self::SUPPORTED_TUNES(inner) => Some(inner.target_system),
35425            Self::TIMESYNC(inner) => Some(inner.target_system),
35426            Self::TUNNEL(inner) => Some(inner.target_system),
35427            Self::V2_EXTENSION(inner) => Some(inner.target_system),
35428            _ => None,
35429        }
35430    }
35431    fn target_component_id(&self) -> Option<u8> {
35432        match self {
35433            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_component),
35434            Self::CANFD_FRAME(inner) => Some(inner.target_component),
35435            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_component),
35436            Self::CAN_FRAME(inner) => Some(inner.target_component),
35437            Self::COMMAND_ACK(inner) => Some(inner.target_component),
35438            Self::COMMAND_CANCEL(inner) => Some(inner.target_component),
35439            Self::COMMAND_INT(inner) => Some(inner.target_component),
35440            Self::COMMAND_LONG(inner) => Some(inner.target_component),
35441            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_component),
35442            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_component),
35443            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_component),
35444            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_component),
35445            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_component),
35446            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_component),
35447            Self::GPS_INJECT_DATA(inner) => Some(inner.target_component),
35448            Self::LOGGING_ACK(inner) => Some(inner.target_component),
35449            Self::LOGGING_DATA(inner) => Some(inner.target_component),
35450            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_component),
35451            Self::LOG_ERASE(inner) => Some(inner.target_component),
35452            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_component),
35453            Self::LOG_REQUEST_END(inner) => Some(inner.target_component),
35454            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_component),
35455            Self::MISSION_ACK(inner) => Some(inner.target_component),
35456            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_component),
35457            Self::MISSION_COUNT(inner) => Some(inner.target_component),
35458            Self::MISSION_ITEM(inner) => Some(inner.target_component),
35459            Self::MISSION_ITEM_INT(inner) => Some(inner.target_component),
35460            Self::MISSION_REQUEST(inner) => Some(inner.target_component),
35461            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_component),
35462            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_component),
35463            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_component),
35464            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_component),
35465            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_component),
35466            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_component),
35467            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_component),
35468            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_component),
35469            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_component),
35470            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_component),
35471            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_component),
35472            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_component),
35473            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_component),
35474            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_component),
35475            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_component),
35476            Self::PARAM_EXT_SET(inner) => Some(inner.target_component),
35477            Self::PARAM_MAP_RC(inner) => Some(inner.target_component),
35478            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_component),
35479            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_component),
35480            Self::PARAM_SET(inner) => Some(inner.target_component),
35481            Self::PING(inner) => Some(inner.target_component),
35482            Self::PLAY_TUNE(inner) => Some(inner.target_component),
35483            Self::PLAY_TUNE_V2(inner) => Some(inner.target_component),
35484            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_component),
35485            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_component),
35486            Self::REQUEST_EVENT(inner) => Some(inner.target_component),
35487            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_component),
35488            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_component),
35489            Self::SERIAL_CONTROL(inner) => Some(inner.target_component),
35490            Self::SETUP_SIGNING(inner) => Some(inner.target_component),
35491            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_component),
35492            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_component),
35493            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_component),
35494            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_component),
35495            Self::SUPPORTED_TUNES(inner) => Some(inner.target_component),
35496            Self::TIMESYNC(inner) => Some(inner.target_component),
35497            Self::TUNNEL(inner) => Some(inner.target_component),
35498            Self::V2_EXTENSION(inner) => Some(inner.target_component),
35499            _ => None,
35500        }
35501    }
35502}